我目前在Visual Studio Online(VSO)中設置了項目,並且在設置自動化構建時遇到了麻煩。 我的解決方案包含以通用Windows爲目標的項目 VSO使用msbuild來運行我的項目。在線視覺工作室的通用應用程序
在生成過程中我看到這樣奇怪的錯誤信息:
Error CS0518: Predefined type 'System.Void' is not defined or imported
Error CS0518: Predefined type 'System.Object' is not defined or imported
Error CS0246: The type or namespace name 'Uri' could not be found (are you missing a using directive or an assembly reference?)
的MSBuild調用具有以下參數:
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild.exe "C:\a\b0d9e3fd\test\src\Shipping.sln" /nologo /m /nr:false /fl /flp:"logfile=C:\a\b0d9e3fd\test\src\Shipping.sln.log" /dl:CentralLogger,"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:Platform=Win32 /p:TargetVersion=」Windows10」 /p:TargetPlatformVersion=」10.0.10010.0」 /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="14.0"
這有什麼錯呢?是否還有其他額外的參數需要使用msbuild構建通用Windows應用程序?
FWIW,我偶然發現了這個問題,因爲我正在創建一個Visual Studio 2015便攜式庫,並選擇了Windows 10作爲目標。 –