我正在尝试使用以下命令构建dotnet解决方案,但出现错误
CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' using MSBuild.exe
命令:
bat "\"${tool 'MSBuild'}\" Test.sln /t:Rebuild /p:Configuration=Release /p:VisualStudioVersion=14.0 /p:NoWarn=7035 /p:Platform=\"Any CPU\" "
该代码存在于Bitbucket中,我正在从Jenkins触发构建。该代码正在Windows服务器中运行。
bat "\"${tool 'MSBuild'}\" Test.sln /t:Rebuild /p:Configuration=Release /p:VisualStudioVersion=14.0 /p:NoWarn=7035 /p:Platform=\"Any CPU\" "
error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'TestInitialize' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)