.NET Core-框架“ DNXCore,Version = v5.0”的参考程序集找不到 [英] .NET Core - The reference assemblies for framework "DNXCore,Version=v5.0" were not found

查看:89
本文介绍了.NET Core-框架“ DNXCore,Version = v5.0”的参考程序集找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将.NET核心库(DNXCore50)从VS 2015迁移到VS 2017时出现此错误。

I'm getting this error when migrating a .NET core lib (DNXCore50) from VS 2015 to VS 2017.


找不到框架 DNXCore ,版本= v5.0的程序集。

The reference assemblies for framework "DNXCore,Version=v5.0" were not found.

我的项目文件当前看起来像这样:(在VS 2017迁移向导将我的 project.json迁移到.csproj文件之后)

My project file currently looks like this: (after the VS 2017 migration wizard migrated my "project.json" to a .csproj file)

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <Description>An FTP and FTPS library for .NET, optimized for speed. Provides extensive FTP commands, file uploads/downloads, SSL/TLS connections and FTP proxies.</Description>
    <VersionPrefix>16.3.0</VersionPrefix>
    <Authors>J.P. Trosclair;Harsh Gupta</Authors>
    <TargetFrameworks>netstandard1.6;dnxcore50</TargetFrameworks>
    <DefineConstants>$(DefineConstants);CORE</DefineConstants>
    <RootNamespace>FluentFTP</RootNamespace>
    <AssemblyName>FluentFTP</AssemblyName>
    <OutputType>Library</OutputType>
    <PackageId>FluentFTP</PackageId>
    <NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
    <TargetFrameworkIdentifier>DNXCore</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
    <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
    <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
    <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
    <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
    <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
    <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
    <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
    <GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.IO" Version="4.3.0.0" />
    <PackageReference Include="System.Net.NameResolution" Version="4.3.0.0" />
    <PackageReference Include="System.Net.Sockets" Version="4.3.0.0" />
    <PackageReference Include="System.Net.Security" Version="4.3.0.0" />
  </ItemGroup>

</Project>

编译时出现上述错误。我尝试过的事情:

I'm getting the above mentioned error when I compile. Things I've tried:


  • 改为使用 .NETPortable v5.0

  • 改为使用 .NETCoreApp v1.0 。每堂课都缺。我是否使用了错误的版本?

  • 使用 DNXCore 。没有缺课。 VS只是一个错误。

  • Using .NETPortable v5.0 instead. Too many missing classes here.
  • Using .NETCoreApp v1.0 instead. Every class is missing. Did I use a wrong version?
  • Using DNXCore. No missing classes. Just one error from VS.

我应该使用什么代替DNXCore 5.0?我需要最新的API,例如 TlsStream Uri ,不存在这些东西,或者有没有办法强制编译器进行编译?请注意,当我使用VS 2015进行编译时,这是一个工作库。现在,我切换到VS 2017,现在无法再编译我的项目了!在.NET Core或.NET Portable中。

What should I use instead of DNXCore 5.0? I need the latest APIs like TlsStream and Uri, stuff not present Or is there a way to force the compiler to compile? Please note this was a working library when I used VS 2015 to compile. Now that I've switched to VS 2017 I cannot compile my project anymore! in either .NET Core or .NET Portable.

推荐答案

好吧,这真令人惊讶!

我的库已成功使用 .NETStandard v1.6 编译!!

My lib successfully compiled with .NETStandard v1.6!

在此处包含我的XML以防其他人遇到此问题:

Including my XML here in case anyone else has this issue:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <Description>An FTP and FTPS library for .NET, optimized for speed. Provides extensive FTP commands, file uploads/downloads, SSL/TLS connections and FTP proxies.</Description>
    <VersionPrefix>16.3.0</VersionPrefix>
    <Authors>J.P. Trosclair;Harsh Gupta</Authors>
    <TargetFrameworks>netstandard1.6;dnxcore50</TargetFrameworks>
    <DefineConstants>$(DefineConstants);CORE</DefineConstants>
    <RootNamespace>FluentFTP</RootNamespace>
    <AssemblyName>FluentFTP</AssemblyName>
    <OutputType>Library</OutputType>
    <PackageId>FluentFTP</PackageId>
    <NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v1.6</TargetFrameworkVersion>
    <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
    <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
    <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
    <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
    <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
    <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
    <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
    <GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.IO" Version="4.3.0.0" />
    <PackageReference Include="System.Net.NameResolution" Version="4.3.0.0" />
    <PackageReference Include="System.Net.Sockets" Version="4.3.0.0" />
    <PackageReference Include="System.Net.Security" Version="4.3.0.0" />
  </ItemGroup>

</Project>

这篇关于.NET Core-框架“ DNXCore,Version = v5.0”的参考程序集找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆