JetBrains / teamcity-dotnet-plugin

TeamCity plugin for .NET projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generated .rsp file breaks command

orihomie opened this issue · comments

Hi, I'm using .NET Cli to launch my tests and generated command is

[dotnet test] Starting: C:\Program Files\dotnet\dotnet.exe test .\MySln.sln --filter "Category!=SchemaTests" --configuration Release --no-build --no-restore -- xunit.parallelizeAssembly=true -- xunit.parallelizeTestCollections=true -- xunit.maxParallelThreads=-1 @d:\buildAgent1\temp\agentTmp\1.rsp

What is that generated .rsp file? Can I somehow get rid of it? Because it seems that it breaks passing that xunit runner arguments

seems to be a copy of #81, closing

BTW I was trying to run same tests through powershell buildstep, but that wasnt working
Then I've updated .netcore sdk on a build machine and added "--configuration Release" (it was lacking there) to a script line and voila - that worked!
So, command was:

dotnet test .\MySln.sln --filter "Category!=SchemaTests" --configuration Release --no-build --no-restore -- xunit.parallelizeAssembly=true -- xunit.parallelizeTestCollections=true -- xunit.maxParallelThreads=-1

@orihomie Did you ever figure out exactly why the rsp file breaks the command?

@jzabroski yes, it's in #81
tldr; it was kind a bug that rsp arg follows xunit args

It seems the generated rsp file is broken in TeamCity 2021.2 (build 99542).

It contains the following line:

/l:TeamCity.MSBuild.Logger.TeamCityMSBuildLogger,C:\Program Files\TeamCity\buildAgent\plugins\dotnet\tools\msbuild15\TeamCity.MSBuild.Logger.dll;TeamCity;plain

It looks like as there are no quotes around "C:\Program Files...", the build fails with the following error:

[MSBuild] Starting: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe" <...> "@C:\Program Files\TeamCity\buildAgent\temp\agentTmp\1.rsp"<...>
[14:45:48][MSBuild] in directory: C:\Program Files\TeamCity\buildAgent\work\472eacaf9860c7df
[14:45:48][MSBuild] MSBUILD : error MSB1008: Only one project can be specified.
[14:45:48][MSBuild] Switch: Files\TeamCity\buildAgent\plugins\dotnet\tools\msbuild15\TeamCity.MSBuild.Logger.dll;TeamCity;plain

Please let me know if I need to provide more information on that.

Thanks so much for the quick reply! The fix works perfectly.