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 <email address hidden> 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
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 <email address hidden> wrote: project- file>'. The _UnitTests. NumberTests. TestSerializati on Runtime. Serialization. SerializationEx ception : Unable to find assembly 'NUnitTest, Version= 1.0.4722. 19557, Culture=neutral, PublicKeyToken= null'. Runtime. Serialization. Formatters. Binary. BinaryAssemblyI nfo.GetAssembly () Runtime. Serialization. Formatters. Binary. ObjectReader. GetType( BinaryAssemblyI nfo assemblyInfo, String name) Runtime. Serialization. Formatters. Binary. ObjectMap. .ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemb lyTable) Runtime. Serialization. Formatters. Binary. ObjectMap. Create( String name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemb lyTable) Runtime. Serialization. Formatters. Binary. __BinaryParser. ReadObjectWithM apTyped( BinaryObjectWit hMapTyped record) Runtime. Serialization. Formatters. Binary. __BinaryParser. ReadObjectWithM apTyped( BinaryHeaderEnu m binaryHeaderEnum) Runtime. Serialization. Formatters. Binary. __BinaryParser. Run() Runtime. Serialization. Formatters. Binary. ObjectReader. Deserialize( HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) Runtime. Serialization. Formatters. Binary. BinaryFormatter .Deserialize( Stream serializationSt ream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) Runtime. Serialization. Formatters. Binary. BinaryFormatter .Deserialize( Stream serializationSt ream) _UnitTests. NumberTests. TestSerializati on() in C:\temp\ nunit-examples\ NUnitTest- failing\ NUnitTest\ _UnitTests\ NumberTests. cs:line 48 project- file> /run) /bugs.launchpad .net/bugs/ 1086733/ +attachment/ 3452083/ +files/ nunit-examples. 7z /bugs.launchpad .net/bugs/ 1086733 /bugs.launchpad .net/nunitv2/ +bug/1086733/ +subscriptions
> 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-
> 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.
> System.
> at System.
> at System.
> at System.
> at System.
> at System.
> at System.
> at System.
> at System.
> at System.
> at System.
> at NUnitTest.
>
> I've quickly tested in the nunit GUI (nunit <path-to-
> and that gets the same results.
>
> ** Affects: nunitv2
> Importance: Undecided
> Status: New
>
> ** Attachment added: "Examples of working / failing projects"
> https:/
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https:/
>
> Title:
> "Unable to find assembly" from VS project with output dir outside
> project dir
>
> To manage notifications about this bug go to:
> https:/