"Unable to find assembly" from VS project with output dir outside project dir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nunit-console |
New
|
Undecided
|
Unassigned |
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-
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-
affects: | nunitv2 → nunit-console |
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...
> 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.