我已经安装了官方的.NET Core 2.0 SDK,但在Visual Studio中出现了很多错误,并且目标框架没有列出 :(
就好像没有安装.NET Core 2.0一样。
这里是.csproj
文件:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</ItemGroup>
</Project>
此外,dotnet --version
返回 2.0.0
。
那么,我是否缺少一些安装工具?
编辑/更新:
这是我从 VS 获取的系统信息:
Microsoft Visual Studio Community 2017
Version 15.3.1
VisualStudio.15.Release/15.3.1+26730.8
Microsoft .NET Framework
Version 4.7.02046
Installed Version: Community
Visual Basic 2017 00369-60000-00001-AA912
Microsoft Visual Basic 2017
Visual C# 2017 00369-60000-00001-AA912
Microsoft Visual C# 2017
Application Insights Tools for Visual Studio Package 8.8.00712.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.30726.0
ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.
ASP.NET Template Engine 2017 15.0.30726.0
ASP.NET Template Engine 2017
ASP.NET Web Frameworks and Tools 2017 5.2.50601.0
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 15.0.30728.0
Azure App Service Tools v3.0.0
... rest snipped.