2017-04-24 5 views
2

MacOS上でasp.netコア1.1 Webアプリケーションを実行しようとしています。project.assets.jsonが見つかりません

JSON:EC json$ dotnet run 
/usr/local/share/dotnet/sdk/1.0.3/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(154,5): error : Assets file ‘/Users/jasonfenwick/Documents/Account Creation and Dashboard/EmptyCubicle/EmptyCubicle/obj/project.assets.json’ not found. Run a NuGet package restore to generate this file. [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(6,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(7,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(8,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(9,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(10,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(11,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(12,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(13,12): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(6,55): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(7,61): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(8,59): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(9,59): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(10,68): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(11,55): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(12,53): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(13,55): error CS0518: Predefined type ‘System.String’ is not defined or imported [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(3,7): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
obj/Debug/netcoreapp1.1/EmptyCubicle.AssemblyInfo.cs(4,7): error CS0246: The type or namespace name ‘System’ could not be found (are you missing a using directive or an assembly reference?) [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 
/usr/local/share/dotnet/sdk/1.0.3/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(92,5): error : Assets file ‘/Users/jasonfenwick/Documents/Account Creation and Dashboard/EmptyCubicle/EmptyCubicle/obj/project.assets.json’ not found. Run a NuGet package restore to generate this file. [/Users/jasonfenwick/Documents/Account%20Creation%20and%20Dashboard/EmptyCubicle/EmptyCubicle/EmptyCubicle.csproj] 

The build failed. Please fix the build errors and run again. 

:私はdotnet restore物事を実行すると、私はスムーズに行くが、私は、私はこのエラーメッセージを取得するアプリを構築したり実行しようとすると、SDK(現在は1.0.3) を含む.NETの最新バージョンをダウンロードしました私は、プログラムが "dotnet restore"が実行されたときに作成されるproject.assons.jsonファイルを探していることを確認しました。正しいフォルダにあります。

私はこのファイルを削除して、dotnet restoreを再実行して、ファイルを再作成しようとしました。しかし、エラーは続く。

+0

プロジェクト内のbin/obj/foldersを削除し、別のdotnetリストアを実行してください。それは、ファイルが適切に復元されなかったように見える、私にとっては同様の問題を修正しました。 – Anthony

+0

'.csproj'ファイルも投稿できますか? 'dotnet restore'を実行して出力をポストします。時には、リストア中に見逃しやすいエラーがあります。 –

+0

VSTSに配備されたWindows 2017ホストマシンビルドでもこの問題が発生しています。 – code

答えて

0

Nuget 4.xにアップグレードすると、欠落しているproject.assets.jsonが生成されます。

関連する問題