2017-02-27 23 views
0

私はVisual StudioコードのプロジェクトC#プロジェクトに取り組んでおり、デバッグ機能を利用する必要があります。しかし、私は、デバッガを実行すると、私は次のメッセージが出ます:Visual Studioコードでデバッガを動作させることができませんか?

-------------------------------------------------------------------------------- 
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio 
Code, Visual Studio or Visual Studio for Mac software to help you develop and 
test your applications. 
-------------------------------------------------------------------------------- 
The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found. 

    - Check application dependencies and target a framework version installed at: 

     C:\Program Files\dotnet\shared\Microsoft.NETCore.App 

    - The following versions are installed: 

     1.1.0 

    - Alternatively, install the framework version '1.0.1'. 

The program 'c:\Projects\App1\bin\Debug\netcoreapp1.0\App1.dll' has exited with code -2147450749 (0x80008083). 

のメッセージ私の元の理解では、ラインがMicrosoft.NETCoreのバージョンを示すように、私はproject.json依存ファイルを変更するために必要なことでした.Appが1.0.1から1.1.0に更新されました。しかし、これは何の違いも見られなかった。私はこのメッセージをグーグルで試してみましたが、議論の多くを本当に理解していませんでした。誰かが私にこの方向性を向けることができますか?

私が提供できる情報が他にもある場合は、私に知らせてください。現時点では

は、私のproject.jsonは次のようになります。

{ 
"version": "1.1.0-*", 
"buildOptions": { 
"debugType": "portable", 
"emitEntryPoint": true 
}, 
"testRunner": "xunit", 
"dependencies": { 
"xunit": "2.2.0-beta2-build3300", 
"dotnet-test-xunit": "2.2.0-preview2-build1029" 
}, 
"frameworks": { 
"netcoreapp1.1": { 
    "dependencies": { 
    "Microsoft.NETCore.App": { 
     //"type": "platform", //remove this line if trying to build a native app via runtime section 
     "version": "1.1.0" 
    } 

    }, 
    "imports": "dnxcore50" 
    } 
}, 
"runtimes": { //this section allows you to specify runtime for native build output, note these will not generate unless type:"platform" is commented out in dependancies 
    "win10-x64": {}, 
    "osx.10.11-x64": {} 
    } 
} 

答えて

1

アプリは、.NETのコアの1.0.1バージョンを期待している、とあなたが実際に1.1.0バージョンで実行されています。私はあなたがVisual Studio 2015でプロジェクトを作った後、Visual Studio Codeでそれをデバッグしようとしていると思いますか?

もしそうなら、project.jsonのバージョンを1.1.0に変更し、dotnet restoreをビルドしてもう一度実行してください。

のVisual Studio 2015は.NETのコアCLIは1.1.0ですので、1.1.0 &にプロジェクトの依存関係を更新することは可能であろう

+0

を復元しながら、それは他の誰かだった、バージョン1.0.1とツールキットを使用していますそれはプロジェクトテンプレートを構築し、私は彼らがVisual Studioを使用すると信じています。申し訳ありませんが密集しているが、どのような依存関係のビットを変更する必要がありますか?フレームワーク>依存> Microsoft.NETCore.Appでバージョン番号を変更してみましたが、プロジェクトを復元しましたが、同じメッセージが表示されています。 – jamessct

+0

@jamessct project.jsonファイルを確認します。 .NET Coreバージョンへの参照がいくつかあります。 – TanguyB

+0

@jamessct "sdk"バージョンがあり、変更可能なglobal.jsonファイルが存在する可能性もあります。 – TanguyB

関連する問題