Visual Studio for mac无法创建.net核心应用程序

时间:2016-11-17 09:22:13

标签: visual-studio

今天,我安装vs for mac,我的操作系统已经安装了.net core 1.0.0,今天我安装了新版本1.1。 但是在创建了一个.net核心项目后,我构建并运行它。但是,它报告了一个错误:

Swift 3 Language changes

那我该怎么办?

现在,我卸载了.netCore1.0.0,但错误仍然存​​在。

3 个答案:

答案 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)

您已安装:

  • Microsoft.NETCore.App 1.0.0
  • Microsoft.NETCore.App 1.1.0

但是你的新项目目标版本为1.0.1。

您可以安装1.0.1版,或将目标项目版本更改为已安装的版本之一。

答案 2 :(得分:0)

我打开了.csproj并对其进行了更新,设置了TargetFramework = My current version.NETCore.app>Version = My current versionMicrosoft.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>
相关问题