teamcity_dotnet_nunitlauncher_msbuild_task
Why would adding this to my .csproj file:
<UsingTask TaskName="NUnit" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)"/>
<Target Name="Test" DependsOnTargets="Build">
<CreateItem Include="bin\$(Configuration)\*.Tests.dll">
<Output TaskParameter="Include" ItemName="TestAssemblies" />
</CreateItem>
<NUnit Assemblies="@(TestAssemblies)"/>
</Target>
Cause this to happen?
---------------------------
Microsoft Visual Studio
---------------------------
Unable to read the project file 'Alpha.Modules.Sam.Tests.csproj'.
C:\development\Alpha\core\src\Tests\Alpha.Modules.Sam.Tests\Alpha.Modules.Sam.Tests.csproj(99,31): The result "" of evaluating the value "$(teamcity_dotnet_nunitlauncher_msbuild_task)" of the "AssemblyFile" attribute in element <UsingTask> is not valid.
---------------------------
OK
---------------------------
I thought I'd make a straight cut-and-paste from here: http://www.jetbrains.net/confluence/display/TCD4/NUnit+for+MSBuild
Please sign in to leave a comment.
That assembly is only defined when the build is running under TeamCity started msbuild script ( by sln2005, sln2008 and msbuild runners).
To make script workable outside TeamCity you will have to add Condition attributes to all parts that rely on TeamCity.
Like: <NUnitTeamCity ... Condition=" "'$(TEAMCITY_VERSION' != '' "" />
Thanks!