nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #00483
[Bug 517187] Re: Unexpected Config File Name Used When Opening csproj File
** Branch linked: lp:nunitv2
--
Unexpected Config File Name Used When Opening csproj File
https://bugs.launchpad.net/bugs/517187
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
Status in NUnit V2 Test Framework: Fix Committed
Bug description:
I'm running NUnit 2.5.2.9222 and Visual Studio 2008. I launch the NUnit GUI from with VS 2008 via an External Tool menu item by following the instructions on this documentation page: http://nunit.com/index.php?p=vsSupport&r=2.5.2
For the External Tool's Arguments setting, I use: $(ProjectDir)$(ProjectFileName)
Note that the aforementioned documentation states "...the following command would load the tests using the configuration file nunit.tests.config located in the same directory as the csproj file.: nunit.exe nunit.tests.csproj"
However, contrary to what the documentation says, if my project is named "nunit.tests.csproj", the configuration file "nunit.tests.config" is NOT loaded. Instead, I have found that I must rename my configuration file to "nunit.tests.csproj.config". That is, I have to add ".csproj" in front of ".config".
This requirement to add ".csproj" to the file name is confirmed by outputting the value of "AppDomain.CurrentDomain.SetupInformation.ConfigurationFile" at runtime, which is indeed "nunit.tests.csproj.config".
What is really confusing is that if you click "Project..Edit" in the NUnit GUI, the "Project Editor" dialog shows the Configuration File Name as "nunit.tests.config" (i.e. without the ".csproj").
To summarize, in the case of opening a csproj file, I think either the NUnit GUI should be changed to use the name "nunit.tests.config" or the documentation should be changed to add ".csproj" to the name.
References