我正在使用.Net Core 2.2构建应用程序。当我使用Visual Studio Code运行它时,它工作得很好。我无法使用“完整的” Visual Studio 2017来工作。
启动它后,出现错误System.IO.FileNotFoundException,无法加载System.Runtime,版本= 4.2.1.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a
这是my * .csproj的开头:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="vue" Version="2.5.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.3" />
</ItemGroup>
我确定我已经安装了正确的.NET SDK和运行时,因为我的应用程序可以在其他IDE上运行。在VS2017中如何启动它?