无法引用Nuget软件包中包含的dll

时间:2019-04-30 00:58:01

标签: .net visual-studio nuget-package visual-studio-2019 dll-reference

我遇到一个奇怪的问题,即我无法引用nuget程序包中包含的dll。

奇怪的是,其他使用此软件包的其他人都可以引用此dll并使用其中的类。

我的Visual Studio中是否有某些设置可以阻止这种情况?

我可以通过解决方案资源管理器视图查看该nuget软件包中包含的dll ...

谢谢!

++提供有关该项目的更多详细信息 我们的项目中没有package.config文件。 这是一个netcoreapp2.1项目

我们通过

引用该软件包
<iframe
          [src]="track.embeddedUri | SafePipe"
          width="320"
          height="90"
          frameborder="0"
          allowtransparency="true"
          allow="encrypted-media"
        ></iframe> 

.csproj文件中

dll是通过csproj中的一行下面的包引用的

<PackageReference Include="Microsoft.MarketplaceServices.CatalogOrchestrator.EventPublishers.AzureFunctions" Version="1.1.0" />

1 个答案:

答案 0 :(得分:0)

实际上,清理本地nuget缓存并重新安装软件包可以解决此问题...大声笑

使用以下命令通过nuget软件包管理器清理了本地nuget缓存:

┌────────day─┬──mau─┐
│ 2019-04-04 │ 1278 │
│ 2019-04-05 │ 1375 │
│ 2019-04-06 │ 1162 │
│ 2019-04-07 │ 1237 │
│ 2019-04-08 │ 1272 │
│ 2019-04-09 │ 1263 │
│ 2019-04-10 │ 1336 │
│ 2019-04-11 │ 1457 │
│ 2019-04-12 │ 1286 │
│ 2019-04-13 │ 1210 │
│ 2019-04-14 │ 1253 │
│ 2019-04-15 │ 2342 │
│ 2019-04-16 │ 1464 │
│ 2019-04-17 │ 1513 │
│ 2019-04-18 │ 1158 │
│ 2019-04-19 │ 1207 │
│ 2019-04-20 │ 1222 │
│ 2019-04-21 │ 1054 │
│ 2019-04-22 │ 1505 │
│ 2019-04-23 │ 5287 │
│ 2019-04-24 │ 4367 │
│ 2019-04-25 │ 3624 │
│ 2019-04-26 │ 2415 │
│ 2019-04-27 │ 1962 │
│ 2019-04-28 │ 2032 │
│ 2019-04-29 │ 2547 │
│ 2019-04-30 │ 4059 │
└────────────┴──────┘