2014-07-17 55 views
0

我試圖完成一個開箱即用的MVC4項目的MSBuild,以便最終在我的現實生活應用程序中與Jenkins結合使用它。我試過的不是詳細教程我試過的是HereMSBuild和ASP.NET

首先,有沒有其他的開源方式來編譯+部署ASP.NET應用? - 它必須可插入詹金斯。

其次,我不斷收到許多類型的錯誤,但它們都不易於調試,因爲有價值的文檔不會在Google上輕鬆彈出。任何好的「自動生成」工具還是不錯的簡短的手冊開始使用它?

三,具體錯誤:
1. Build started 7/15/2014 10:47:13 AM. 1>Project "C:\WebSites\jenkinsDeployment\Jenkins\TestJenkinsGit.sln" on no de 1 (default targets). 1>C:\WebSites\jenkinsDeployment\Jenkins\TestJenkinsGit.sln.metaproj : erro r MSB4126: The specified solution configuration "Debug|HPD" is invalid. Please specify a valid solution configuration using the Configuration an d Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=De bug /p:Platform="Any CPU") or leave those properties blank to use the de fault solution configuration. [C:\WebSites\jenkinsDeployment\Jenkins\Tes tJenkinsGit.sln] 1>Done Building Project "C:\WebSites\jenkinsDeployment\Jenkins\TestJenkins Git.sln" (default targets) -- FAILED. 2.

C:\Program Files (x86)\Jenkins\jobs\MyApp-Test\workspace>C:\Windows\Microsoft.NET\Framework\v4.0.30319 
\MSBuild.exe /p:DeployOnBuild= true /p:PublishProfile=Test;SolutionDir=C:\Program Files (x86)\Jenkins\ 
jobs\MyApp-Test\workspace /m /p:Configuration=Release "/p:Platform=Any CPU" DeployIt.sln    
Microsoft (R) Build Engine version 4.0.30319.33440              
[Microsoft .NET Framework, version 4.0.30319.34014]             
Copyright (C) Microsoft Corporation. All rights reserved.            

MSBUILD : error MSB1008: Only one project can be specified.           
Switch: Files                       

For switch syntax, type "MSBuild /help"                

和許多許多......

回答

0
  1. Mono。因爲它可以運行一個可執行文件,所以所有東西都可以插入到Jenkins中,因此如果你願意,可以插入MSPaint。

  2. MSDN,任何.NET包括MVC的javadoc。還有專用的asp.net/mvc

    1. 如果你傳遞一個自定義平臺(HPD)到.sln然後在溶液中的所有.csproj必須有,否則點擊在Studio解決方案,轉到屬性>配置屬性,並檢查您的[默認]項目平臺設置。

    2. /p標誌不應該用引號括起來,所有帶空格的路徑應當在DeployOnBuild之前不應該有空格,等等。遠程連接到構建服務器上,從錯誤日誌中複製/粘貼命令並修復它直到它被手動運行,然後再將它插回到Jenkins或其他任何地方;更好的是,無論CI服務器如何,都可以從命令行首先在本地構建。