stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.76k stars 175 forks source link

dotnet stryker -s "..\TestPlayGround.sln" Failed #1083

Closed maulikhdave9601672767 closed 4 years ago

maulikhdave9601672767 commented 4 years ago

dotnet stryker -s

failed

roject file contains ToolsVersion=\"15.0\". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion=\"4.0\". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333. GenerateTargetFrameworkMonikerAttribute: Skipping target \"GenerateTargetFrameworkMonikerAttribute\" because all output files are up-to-date with respect to the input files. CoreCompile: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:\"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\Microsoft.CSharp.dll\"

rouke-broersma commented 4 years ago

Hi!

One of the things I've noticed sometimes goes wrong with visual studio 2019 is that the nuget targets and build tasks do not get installed.

Please check that these are installed here:

image

Also, when I google your error I find this stackoverflow post:

https://stackoverflow.com/questions/42932577/error-cs1056-unexpected-character-running-the-msbuild-on-a-tfs-continuous-i

Which confirms to me that we are unable to find visual studio 2019 installed on your system, resulting in us using a fallback location for msbuild:

2020-05-17T11:10:19.0789395+05:30 [DBG] Started initial build using "msbuild.exe" (a4e1a5e2) 2020-05-17T11:10:19.0804931+05:30 [DBG] Using vswhere.exe to locate msbuild (fffd9912) 2020-05-17T11:10:19.4562515+05:30 [DBG] Unable to find msbuild using vswhere, using fallback locations (a80d7c1a)

Unfortunately the fallback location we use seems to contain msbuild older than the version shipped with visual studio 2015, which means that it does not contain support for string interpolation which is why the compilation fails.

maulikhdave9601672767 commented 4 years ago

resolved

rouke-broersma commented 4 years ago

Could you share how you fixed the problem? :)

maulikhdave9601672767 commented 4 years ago

what you suggest it work. thanks for help

dupdob commented 4 years ago

Makes me think we should add a warning when we identify an old version of MSbuild, especially if we have a failure during the initial build