今天,我安装vs for mac,我的操作系统已经安装了.net core 1.0.0,今天我安装了新版本1.1。 但是在创建了一个.net核心项目后,我构建并运行它。但是,它报告了一个错误:
那我该怎么办?
现在,我卸载了.netCore1.0.0,但错误仍然存在。
答案 0 :(得分:0)
尝试更新<script src="https://cdnjs.cloudflare.com/ajax/libs/deepstream.io-client-js/1.1.1/deepstream.js"></script>
文件中的版本并运行project.json
以恢复项目中的alle工具和依赖项。
有关更多信息,请查看Scott Hanselman's博客
答案 1 :(得分:0)
您已安装:
但是你的新项目目标版本为1.0.1。
您可以安装1.0.1版,或将目标项目版本更改为已安装的版本之一。
答案 2 :(得分:0)
我打开了.csproj
并对其进行了更新,设置了TargetFramework = My current version
,.NETCore.app>Version = My current version
,Microsoft.NET.Sdk>Version=My current version
。现在,它运作良好。
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NET.Sdk">
<Version>1.0.0-preview2-1-003177</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>