給定VS2010的C#解決方案,如何導出當前的構建/編譯設置,以便可以使用命令行構建/編譯它。如何導出VS2010命令行構建/編譯參數
1
A
回答
4
您是否定製了任何構建選項?您可以從Visual Studio 2010命令提示符使用msbuild。
msbuild YourSolution.sln
您還可以指定各種解決方案屬性,例如配置。
msbuild YourSolution.sln /p:Configuration=Release
2
如果您的意思是通過「csc」;調出Output窗口;構建並將其更改爲Build;現在在該窗口中查找csc
。例如:
Task "Csc" (TaskId:21)
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\x86\Debug\ConsoleApplication26.exe /target:exe Program.cs Properties\AssemblyInfo.cs "C:\Users\mgravell\AppData\Local\Temp\.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs" (TaskId:21)
或(在不同的輸出電平):
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\x86\Debug\ConsoleApplication26.exe /target:exe Program.cs Properties\AssemblyInfo.cs "C:\Users\mgravell\AppData\Local\Temp\.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs"
+0
我沒有看到有一個生成窗口 – q0987
+0
@ q0987的**輸出**窗口,然後選擇「構建」選項*在*窗口中 –
相關問題
- 1. 使用命令行參數調試VS2010
- 2. 如何構建命令行
- 3. 如何根據命令行參數條件編譯NSIS腳本?
- 4. 如何將參數傳遞給Inno Setup命令行編譯器?
- 5. 如何運行Eclipse Maven使用命令行參數構建
- 6. 命令行編譯
- 7. 從命令行編譯類時出錯
- 8. 創建命令行參數
- 9. 如何編譯命令行從
- 10. 如何從命令行編譯APK?
- 11. 如何使用命令行編譯包
- 12. Apple命令行工具和XCode用於開源編譯/構建?
- 13. 如何使用vim構建或編譯VS2010/XNA4項目?
- 14. java命令行編譯
- 15. 從命令行編譯
- 16. gnu從命令行編譯
- 17. kotlin命令行編譯器
- 18. 無法命令行編譯
- 19. Java命令行編譯
- 20. java編譯命令行
- 21. C#的命令行編譯#
- 22. xcode命令行編譯
- 23. 如何編譯谷歌Protobuf命令行界面編譯
- 24. 如何將從Linux中的命令行編譯的C程序導出到IDE?
- 25. 改變構建從VS2010工具VS2015在命令行
- 26. Gulp:放棄構建,如果命令行參數丟失
- 27. 如何反轉命令行編譯錯誤輸出?
- 28. 如何通過命令行構建SSISDeploymentManifest
- 29. 如何使用命令行構建apk
- 30. 如何從命令行構建android apk?
問題是你將如何使用命令行構建。據此,我認爲答案可以不同。 –
如果你的意思是通過「csc」;注意,雖然你可以讓IDE發出這個(我仍然試圖挖掘出如何),但它是一個白色的謊言:http://blogs.msdn.com/b/ed_maurer/archive/2008/06/11 /a-tale-of-two-compilers.aspx –
複製它從輸出窗口:) –