【发布时间】:2018-06-08 06:58:58
【问题描述】:
Linux 环境 - Ubuntu 16.04 LTS。我已经安装了 .net core 2.1300(最新,带 sdk)。
我正在尝试在 C# 中构建(dotnet build)一个 .csproj 文件。
So $: dotnet build CarLibTool.2010.csproj
但错误是:
/usr/share/dotnet/sdk/2.1.300/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies
存在哪些可能的解决方案?
也许改变 .csproj ?
【问题讨论】:
-
您无法在 Linux 上构建或运行 .NET Framework 项目 - 仅支持 .NET Core/Standard 项目。
-
如果你想查看我的 .csproj 文件,那么:collabedit.com/3sswr
-
您没有在该文件中定位 .Net 核心。
-
NielsNet,那么我应该更改哪些内容以及从哪个文件更改?谢谢