![](/img/trans.png)
[英]MSBuild command line execution of Visual Studio 2010 Solution fails referencing VS2010 SDK to build an extension
[英]Build VS2010 solution file from msbuild command line
我想從命令行使用msbuild構建我的VS2010 .sln文件(項目是.net 4.0)。 我希望這個工作......
>C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe application.sln
但是我收到這條消息:
"Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5"."
構建繼續,但它找不到我的任何引用並失敗。
我可能錯過了一些明顯的東西......任何幫助都會受到贊賞。
謝謝,
-dk
本文可能有用: http : //blog.prabir.me/post/Downgrading-VS2010-solutions-to-VS2008.aspx
它似乎沒有針對正確的msbuild版本(錯誤來自3.5 msbuild ver),嘗試打開Visual Studio 2010命令提示符,轉到解決方案目錄並運行msbuild.exe SolutionName.sln
這可能會有所幫助。
那很奇怪。 VS2010能正常工作嗎? 如果不是鍵缺少HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ MSBuild \\ ToolsVersions \\ 4.0? (安裝不好。)
驗證頂部的.sln版本號是否為11。
這些是我能想到的唯一原因。
擔
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.