nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03349
Re: [Bug 1086733] [NEW] "Unable to find assembly" from VS project with output dir outside project dir
What happens when you run using the path to the test assembly (either
with nunit.exe or nunit-console.exe)?
Charlie
On Wed, Dec 5, 2012 at 3:01 AM, Stuart Wood <sw_bladerunner@xxxxxxxxxxx> wrote:
> Public bug reported:
>
> Version: 2.6.2.12296
> I have attached two copies of a basic VS (2005) project with a single serializable class in it, plus a single [TestFixture] class.
>
> The tests are simplistic - the problem one is serializing an instance of
> the class, then deserializing it back and checking the value is the
> same. I run the tests using 'nunit-console <path-to-project-file>'. The
> working directory seems to have no discernible effect, but I've tried
> within the project dir, solution dir and output dir and the 'failing'
> project always fails.
>
> In the working project, the output directory is set to "bin/Debug/"; in
> the failing project, the output directory is set to '../bin". Other than
> that they are identical.
>
> When I run the tests on the working project, they all run through fine, including the serialization test.
> When I try on the failing project, I get the following report :-
>
> NUnit-Console version 2.6.2.12296
> Copyright (C) 2002-2012 Charlie Poole.
> Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
> Copyright (C) 2000-2002 Philip Craig.
> All Rights Reserved.
>
> Runtime Environment -
> OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
> CLR Version: 2.0.50727.3643 ( Net 3.5 )
>
> ProcessModel: Default DomainUsage: Default
> Execution Runtime: net-3.5
> ...F
> Tests run: 3, Errors: 1, Failures: 0, Inconclusive: 0, Time: 0.234375 seconds
> Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
>
> Errors and Failures:
> 1) Test Error : NUnitTest._UnitTests.NumberTests.TestSerialization
> System.Runtime.Serialization.SerializationException : Unable to find assembly 'NUnitTest, Version=1.0.4722.19557, Culture=neutral, PublicKeyToken=null'.
> at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
> at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
> at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
> at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
> at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
> at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
> at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
> at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
> at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
> at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
> at NUnitTest._UnitTests.NumberTests.TestSerialization() in C:\temp\nunit-examples\NUnitTest-failing\NUnitTest\_UnitTests\NumberTests.cs:line 48
>
> I've quickly tested in the nunit GUI (nunit <path-to-project-file> /run)
> and that gets the same results.
>
> ** Affects: nunitv2
> Importance: Undecided
> Status: New
>
> ** Attachment added: "Examples of working / failing projects"
> https://bugs.launchpad.net/bugs/1086733/+attachment/3452083/+files/nunit-examples.7z
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/1086733
>
> Title:
> "Unable to find assembly" from VS project with output dir outside
> project dir
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunitv2/+bug/1086733/+subscriptions
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1086733
Title:
"Unable to find assembly" from VS project with output dir outside
project dir
Status in NUnit V2 Test Framework:
New
Bug description:
Version: 2.6.2.12296
I have attached two copies of a basic VS (2005) project with a single serializable class in it, plus a single [TestFixture] class.
The tests are simplistic - the problem one is serializing an instance
of the class, then deserializing it back and checking the value is the
same. I run the tests using 'nunit-console <path-to-project-file>'.
The working directory seems to have no discernible effect, but I've
tried within the project dir, solution dir and output dir and the
'failing' project always fails.
In the working project, the output directory is set to "bin/Debug/";
in the failing project, the output directory is set to '../bin". Other
than that they are identical.
When I run the tests on the working project, they all run through fine, including the serialization test.
When I try on the failing project, I get the following report :-
NUnit-Console version 2.6.2.12296
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
CLR Version: 2.0.50727.3643 ( Net 3.5 )
ProcessModel: Default DomainUsage: Default
Execution Runtime: net-3.5
...F
Tests run: 3, Errors: 1, Failures: 0, Inconclusive: 0, Time: 0.234375 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) Test Error : NUnitTest._UnitTests.NumberTests.TestSerialization
System.Runtime.Serialization.SerializationException : Unable to find assembly 'NUnitTest, Version=1.0.4722.19557, Culture=neutral, PublicKeyToken=null'.
at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at NUnitTest._UnitTests.NumberTests.TestSerialization() in C:\temp\nunit-examples\NUnitTest-failing\NUnitTest\_UnitTests\NumberTests.cs:line 48
I've quickly tested in the nunit GUI (nunit <path-to-project-file>
/run) and that gets the same results.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/1086733/+subscriptions
References