Closed quackasaur closed 4 years ago
Hi @kish0 thanks for submitting this issue. My first thought is that we read an empty value from your DefineConstants
in your .csproj
file. It could be possible it contains a value like: TRACE;DEBUG;
. We split the value on ;
and that will leave 3 constants: TRACE
, DEBUG
and ``. The last one could cause the error.
It could be possible that dotnet build filters the empty values and we do not. If that is the case we should probably filter them as well. Could you verify that the DefineConstants
is the problem?
Hi @richardwerkman, as you suggested I removed DEBUG and TRACE constants from my project properties. But I still ended up with the same compile error.
If it helps, I am including a part .csproj file of unit test
Hi @kish0 I've succesfully reproduced the issue. It is caused by the DefineConstants
property in your csproj.
However it would be located in your project under test and not your test project. To be clear, this is what the cause looks like:
<DefineConstants>DEBUG;TRACE;</DefineConstants>
The last ;
causes an empty value when we parse the constants. The correct value looks like:
<DefineConstants>DEBUG;TRACE</DefineConstants>
You should be able to fix it by removing the last ;
. Meanwhile we should filter empty values in Stryker to make sure this error doesn't happen again. 🚀
This should be fixed in the next release, after the PR will be merged :)
Thanks for the help @richardwerkman
Stryker throws a compile error during the initial test run on vstest. No special configurations, just specified the path for my *.csproj file on cmd. Attached the file with logs on the cmd during test run. StrykerLogs.txt
Please let me know if you need additional information.