nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01597
[Bug 697329] Re: NUnit tries to test disabled projects
Outline of what's needed for this bug...
Currently, we read the solution file, find "Project" lines and pull the project path out of the line. The code is inline in
VisualStudioConverter.cs.
In addition, we need to extract the guid from the project line and examine entries for that project (keyed by the guid)
in the solution file. Lines like this one...
{B55A6E53-57A9-4205-B396-C9983B3AF46A}.Debug|Mixed platforms.Build.0 = Debug|Any CPU
indicate that the project is included in the build for a particular configuration. The exact format of the line varies from version to version of VisualStudio but you can probably rely on {guid}.config as the prefix and scan for .Build.0
All of this probably justifies creation of a VSSolution class, which we
don't currently have.
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/697329
Title:
NUnit tries to test disabled projects
Status in NUnit V2 Test Framework:
Triaged
Bug description:
See discussion here: http://groups.google.com/group/nunit-
discuss/browse_thread/thread/c1ab27746efb6d2c
I use the following command to run all unit tests in Visual Studio
solutions:
nunit-console-x86 foo.sln /config=Release
That works great! Except:
Since some projects should not be built in the release configuration,
they have been disabled in the release configuration (using Visual
Studio's "Configuration Manager" - the "Build" checkbox is unchecked).
The problem is that nunit still tries to test the disabled projects,
which results in the following "File not found"-error:
C:\buildsystem\bin\CruiseControl.NET-1.4.3.4023-patched\WorkingDirs\Foo-v2.8>nunit-console-x86 foo.sln /config=Release
NUnit version 2.5.9.10348
Copyright (C) 2002-2009 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 6.1.7600.0
CLR Version: 2.0.50727.4927 ( Net 2.0 )
ProcessModel: Default DomainUsage: Default
Execution Runtime: Default
Could not find file 'C:\buildsystem\bin\CruiseControl.NET-1.4.3.4023-patched\WorkingDirs\Foo-v2.8\SomeDisabledProject\bin\Release\SomeDisabledProject.dll'.
Since specifying the sln-file is very convenient, I'd prefer not
having to specify single csproj-files or single dlls...
Thanks,
Max
References