3

私は OS X にかなり慣れていません (新しい Mac で 4 日)、Visual Studio Code に組み込まれたデバッガーを使用して、Asp.Net 5 Web プロジェクトをローカルでデバッグできる環境のセットアップに取り組んでいます。具体的には、 mono にアタッチするときに機能するブレークポイント。

これらの手順に従って、asp.net 5 とビジュアル スタジオ コードをインストールしました。( http://docs.asp.net/en/latest/getting-started/installing-on-mac.html )

次に、yeoman をインストールし、aspnet プロジェクトの足場を作りました。

コマンド、、、およびを実行dnu restorednu buildましdnx webた。

プロジェクトは、localhost:5000 の Kestrel でローカルに実行されます。VS Code デバッガーを介して mono にアタッチすることもできます。

この問題は、C# コードにブレークポイントを設定しようとすると発生します。デバッガーはそれらをヒットしません。

いくつかの調査を行った後、Startup.cs ファイルをデバッグするファイルとして mono に指定する必要があることがわかりました。( https://code.visualstudio.com/Docs/editor/debugging )

しかし、実行後mcs -debug Startup.cs、次のエラーが発生します。

Startup.cs(5,17): error CS0234: The type or namespace name `AspNet'     does not exist in the namespace `Microsoft'. Are you missing an assembly  reference?
Startup.cs(6,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(7,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(8,17): error CS0234: The type or namespace name `Data' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(9,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(10,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(11,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(12,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
Startup.cs(13,16): error CS0234: The type or namespace name `Models' does not exist in the namespace `palmtree'. Are you missing an assembly reference?
Startup.cs(14,16): error CS0234: The type or namespace name `Services' does not exist in the namespace `palmtree'. Are you missing an assembly reference?
Startup.cs(20,24): error CS0246: The type or namespace name `IHostingEnvironment' could not be found. Are you missing an assembly reference?
Startup.cs(20,49): error CS0246: The type or namespace name `IApplicationEnvironment' could not be found. Are you missing an assembly reference?
Startup.cs(39,16): error CS0246: The type or namespace name `IConfigurationRoot' could not be found. Are you missing an assembly reference?
Startup.cs(42,39): error CS0246: The type or namespace name `IServiceCollection' could not be found. Are you missing an assembly reference?
Startup.cs(62,31): error CS0246: The type or namespace name `IApplicationBuilder' could not be found. Are you missing an assembly reference?
Startup.cs(62,56): error CS0246: The type or namespace name `IHostingEnvironment' could not be found. Are you missing an assembly reference?
Startup.cs(62,81): error CS0246: The type or namespace name `ILoggerFactory' could not be found. Are you missing an assembly reference?

Mono が Startup.cs を適切にデバッグ コンパイルできないようです。デバッグをセットアップしようとすると、他の誰かがこのエラーを受け取りますか? または、mono、asp.net 5、kestrel、vs コード、および OS X で動作するブレークポイントを持っている人はいますか?

4

1 に答える 1