简体   繁体   English

软件包与netcoreapp2.2不兼容

[英]Package is not compatible with netcoreapp2.2

I have ported one of my libraries to net core. 我已经将我的一个库移植到了net core。 It works fine from a netcore 2.2 web app. 从netcore 2.2 Web应用程序可以正常工作。 Now I want to package it with nuget. 现在我想用nuget打包。 I use the folder convention way. 我使用文件夹约定方式。

I have tried 我努力了

lib/netcore/mylib.dll LIB /磊/中是指mylib.dll

lib/netstandard2.0/mylib.dll LIB / netstandard2.0 /中是指mylib.dll

lib/netcoreapp2.2 LIB / netcoreapp2.2

But I only get 但是我只会 在此处输入图片说明

What am I doing wrong? 我究竟做错了什么? Thanks 谢谢

edit: Nuget explorer seems to look allright? 编辑:Nuget资源管理器似乎看起来还好吗? Whats going on? 这是怎么回事? :/ Why is it saying netcore version 0.0? :/为什么说netcore版本0.0? 在此处输入图片说明

edit: nuspec 编辑:nuspec

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>SignalR.EventAggregatorProxy</id>
    <version>2.0.165</version>
    <authors>Anders Malmgren</authors>
    <owners>Anders Malmgren</owners>
    <requireLicenseAcceptance>true</requireLicenseAcceptance>
    <licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
    <projectUrl>https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy</projectUrl>
    <description>A Event Aggregator proxy for SignalR</description>
    <releaseNotes></releaseNotes>
    <copyright>Copyright 2013-2019</copyright>
    <tags>SignalR EventAggregator Proxy</tags>
    <dependencies>
      <group targetFramework=".NETCoreApp2.2">
        <dependency id="SignalR.EventAggregatorProxy.Constraint" version="1.3.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.AspNetCore.SignalR" version="1.1.0" exclude="Build,Analyzers" />
      </group>
    </dependencies>
  </metadata>
</package>

If anyone else runs into this. 如果有人碰到这个。 Nuget keeps a cache. Nuget保留一个缓存。 So even if you use a temporary local nuget folder for testing, it will use the cache, so if the cached one contains error (in my case a lib/netcore) it will not update. 因此,即使您使用临时的本地nuget文件夹进行测试,它也会使用缓存,因此,如果缓存的文件夹包含错误(在我的情况下为lib / netcore),它将不会更新。

Fixed by clearing cache 通过清除缓存来修复

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Sonarscanner 不分析 netcoreapp2.2 - Sonarscanner not analyzing netcoreapp2.2 构建成功但发布失败 - 此版本的 Microsoft.AspNetCore.All 仅与 netcoreapp2.2 目标框架兼容 - Build is success but publish fails - This version of Microsoft.AspNetCore.All is only compatible with the netcoreapp2.2 target framework Project xxx与netcoreapp2.2(.NETCoreApp,Version = v2.2)不兼容。 Project xxx支持:net48(.NETFramework,Version = v4.8) - Project xxx is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2). Project xxx supports: net48 (.NETFramework,Version=v4.8) Package X 与 netcoreapp3.1 不兼容 - Package X is not compatible with netcoreapp3.1 Package SharePoint.Client.Runtime 15.0.0 与 netcoreapp3.1 不兼容 - Package SharePoint.Client.Runtime 15.0.0 is not compatible with netcoreapp3.1 NU1202: Package 与 netcoreapp2.0 (.NETCoreApp,Version=v3.0) 不兼容 - NU1202: Package is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v3.0) 错误 NU1202: Package Microsoft.AspNetCore.Blazor.Cli 0.7.0 与 netcoreapp2.0 (.NETCoreApp,Version=v2.0) 不兼容 - error NU1202: Package Microsoft.AspNetCore.Blazor.Cli 0.7.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0) 软件包Microsoft.CSharp 4.5.0与netcoreapp2.1不兼容错误消息 - Package Microsoft.CSharp 4.5.0 not compatible with netcoreapp2.1 Error Message 软件包与 netcoreapp2.0 不兼容 - Packages are not compatible with netcoreapp2.0 项目与netcoreapp2.0不兼容 - Project is not compatible with netcoreapp2.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM