2016-03-30 5 views
0

私はJenkinsボックスにServer 2012r2を実行しています。私はそれに.Net 3.5,4,4.5がインストールされている。 4。を使用して.netプロジェクトを公開すると完全に動作するようです。何かがうまくいかない場合は、.net 4.5 Webプロジェクトを公開することです。Jenkins&MSDeployを使用したASP.net Webプロジェクトの公開

私は3つのビルド手順があります。 1)SLNプロジェクト 2を構築します)ステップ1 3からのコンパイル結果をパッケージ化するのMSBuildを使用する)は、別のサーバーに発行するwebdeployを使用しています。私はと呼ばれるパッケージ/ binディレクトリ内のファイルにまで問題を縮小している

Method not found: '!!0[] System.Array.Empty()'. 

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'. 

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace: 


    [MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.] 
     TestDeploySite.BundleConfig.RegisterBundles(BundleCollection bundles) +0 
     TestDeploySite.MvcApplication.Application_Start() +96 

    [HttpException (0x80004005): Method not found: '!!0[] System.Array.Empty()'.] 
     System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9918157 
     System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118 
     System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 
     System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336 
     System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296 

    [HttpException (0x80004005): Method not found: '!!0[] System.Array.Empty()'.] 
     System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9932052 
     System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 
     System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254 

:サイトに移動するとき

ファイルは、新しいサーバーへの上に自分の道を作るが、私はその後、次のエラーを取得します'TestDeploySite.dll'。これをVS 2015で公開すると、うまく公開されます。 Jenkinsにはビルド時にエラーは表示されず、警告も表示されません。これは、.netバージョンの不一致のようなものです。 します。C:\ Program Files(x86の)\ MSBuildの\ 14.0 \ビン\ MSBuildの

私はwebdeployがインストールされているとうまく機能しているようだ4.5用

MSBuildのは、次のパスで構成されています。 .net 4.5プロジェクトを展開すると、.net Core 1プロジェクトを公開するように再フォーカスしなければならないので、面白いはずです。

誰かがこの問題に対処するための洞察を持っていますか?

+1

ジンキンに使用するmsbuildのバージョンを教えてください。 – jrummell

+0

うん。私はMSbuild 14を指定していますが、実際には100%はビルドされていません。4.6 – Wes

答えて

0

私はmsbuild v14.0用のmsbuild.configを確認しました。サポートされているフレームワークは4.0,4.5.1でした...私はVSに行ってターゲットを4.5.1に変更し、SVNの変更をチェックしました。ジェンキンスで実行されたジョブとサイトは、現在公開されています。 4.51ではなく4.5.0でできることが少し奇妙です...

いずれにしても、問題は解決しました。

関連する問題