2017-02-12 11 views
0

私は、Microsoft(R)Visual Studio(R)Team Servicesとの継続的な統合を使用しています。成功した私のubnuntuサーバー上で実行されますdotnet restoreコマンドの後、私はビルドコマンドdot net buildを実行すると、次のエラーが発生します。Linux上でWeb APIを構築する.net core

(GetReferenceAssemblyPaths target) -> /usr/share/dotnet/sdk/1.0.0-preview3-004056/Microsoft.Common.CurrentVersion.targets(1107,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

は、何が間違っていましたか?私は.netバージョンを4.0に変更しようとしましたが、Linux用のターゲットパックを入手するためのコマンドもいくつか見てきましたが、解決策が見つかりません。

私のシステムで実行されます:

  • のUbuntu 16.04.1 LTS
  • .NETのコア1.0.0プレビュー3
エラーに基づいて
+0

あなたはflubuのようなツールを使って、ビルドプロセスをより簡単にすることができます。 Mora for flubu on:.net coreの例を挙げてください:stackoverflow.com/questions/40890522/...答えは.netです – Stan88

答えて

1

、.NET Frameworkの4.5へのプロジェクトの参照、 .netコアを参照する必要があります。

  1. オープンproject.json
  2. フレームワークのセクションでは、コードは次のようでなければならないチェック(値が「net452」である場合、それを修正{}):

コード:

"frameworks": { 
    //"net452": { } 
    "netcoreapp1.0": { 
     "imports": [ 
     "dotnet5.6", 
     "portable-net45+win8" 
     ] 
    } 
    }, 
関連する問題