我在PluralSight上觀看視頻,然後我去github.com/aspnet/Mvc下載源文件並按照說明進行操作。.NET MVC核心當前的SDK不支持.NET標準2.0
當我下載的文件,並試圖運行程序,我結束了:
Severity Code Description Project File Line Suppression State Error The current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. Microsoft.AspNetCore.Mvc.Formatters.Xml C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 126
我也跟着this後並單獨下載的2.0核心,但它仍然是給我這個錯誤。即使在我更新到Visual Studio 15.3之後。
任何幫助,非常感謝。謝謝!
Severity Code Description Project File Line Suppression State Error KRB1001 Package references have not been pinned. Run './build.cmd /t:Pin'. Also, you can run './build.cmd /t:Restore' which will pin and restore packages. 'build.cmd' can be found in 'C:\Users\ty_lo\source\Mvc\'. VersioningWebSite C:\Users\ty_lo\source\Mvc\Directory.Build.targets 12
Global.aspx是ASP.NET MVC而不是ASP.NET Core MVC。最好的開始是官方文檔:https://docs.microsoft.com/en-us/aspnet/core/ – Tseng
你下載了2.0,但是你是否將項目設置更改爲2.0? – Alexan
@Alexan我在global.json文件中更改了版本,但是我沒有在項目設置中更改它。這是如何完成的? – giggidy