2017-02-12 10 views
2

新しいASP.NETコアWeb APIプロジェクトを作成して、オプション2(ASP.NETコアプロジェクト)を選択してau new --hereコマンドを実行して作成しましたWebアプリケーションの開始点。ASP.NETコアプロジェクトでAurelia CLIコマンドを実行するCannotGETのみ

次は、静的ファイルを提供するためにStartup.csファイルを更新しました。

app.UseDefaultFiles(); 
app.UseStaticFiles(); 
app.UseFileServer(); 

は最後に、私はwwwrootフォルダに構築するためのaurelia.jsonファイルを更新しました。

"platform": { 
    "id": "aspnetcore", 
    "displayName": "ASP.NET Core", 
    "output": "wwwroot/scripts", 
    "index": "wwwroot/index.html", 
    "baseUrl": "scripts" 
}, 

"build": { 
    "targets": [ 
     { 
     "id": "aspnetcore", 
     "displayName": "ASP.NET Core", 
     "output": "wwwroot/scripts", 
     "index": "wwwroot/index.html", 
     "baseUrl": "scripts" 
     } 
], 

オーレリアCLIは、ビルドオプション(AUビルド)と実行オプション(AUラン)の罰金を実行され、それがhttp://localhost:9000のサイトをアップに役立つだろう。 http://localhost:9000/index.html

<html><head></head><body>CannotGET /index.html</body></html> 

私は、Visual StudioおよびIIS Expressのを介してアプリケーションを実行する場合、それは正常に動作を参照しようとしている

<html><head></head><body>CannotGET /</body></html> 

または場合:しかし、私は唯一の次のHTMLがアップ務めを得ます。

auが動作するには何が欠けていますか?

私は、ASP.NET Core 1.0,1.1、Visual Studio 2015、Visual Studio 2017で同じ結果を得ています。もし--hereなしでau newを使用し、良い。

答えて

1

私はGitHubの上で問題に埋もれ答えを見つけました:https://github.com/aurelia/cli/issues/405

run.jsファイルにもパスを更新する必要があります。

baseDir: ['./wwwroot'], 
関連する問題