简体   繁体   English

Nuget 将 debian package 安装到 Z303CB0EF9EDB9082D61BBBE58215D97 项目中。 为什么?

[英]Nuget installing debian package into .NET framework 4.6.1 project; Why?

I have a project and whenever I perform a nuget update it fails with the following:我有一个项目,每当我执行 nuget 更新时,它都会失败并显示以下内容:

15:47:27
    Successfully installed 'Microsoft.NETCore.Targets 3.1.0' to MyProject.csproj
15:47:27
    WARNING: Install failed. Rolling back...
15:47:27
    WARNING: Package 'runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.3' does not exist in project 'MyProject.csproj'
15:47:27
    Removed package 'Microsoft.NETCore.Targets 3.1.0' from 'packages.config'

Is anyone able to provide clarification on why it is trying to install a debian package?有没有人能够解释为什么它试图安装 debian package? I looked at the dependencies for https://www.nuget.org/packages/Microsoft.NETCore.Targets/我查看了https://www.nuget.org/packages/Microsoft.NETCore.Targets/的依赖项

It appears there are none(?)似乎没有(?)

Thanks in advance Mark提前谢谢马克

Nuget installing debian package into .NET framework 4.6.1 project; Nuget 将 debian package 安装到 Z303CB0EF9EDB9082D61BBBE58215D97 项目中。 Why?为什么?

Actually , that package does not have a dependency called runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.3 and I am also wonder why your net framework project needs that dependency. Actually , that package does not have a dependency called runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.3 and I am also wonder why your net framework project needs that dependency.

Also , I found that Net Framework project cannot install that package since it is not compatible with Net Framework.另外,我发现 Net Framework 项目无法安装 package,因为它与 Net Framework 不兼容。 Please check whether your project has any dependent projects.请检查您的项目是否有任何依赖项目。

It is quite strange and I think that something has broken in Nuget,VS or your project itself.这很奇怪,我认为 Nuget、VS 或您的项目本身出现了问题。

Suggestion建议

1) disable any third party extensions under Tools --> Extensions and Updates in case some extensions cause this abnormal behavior. 1)工具-->扩展和更新下禁用任何第三方扩展,以防某些扩展导致此异常行为。

2) click clean all nuget caches under Tools --> Options --> Nuget Package Manager --> General 2)Tools --> Options --> Nuget Package Manager下点击clean all nuget caches --> General

3) Close VS, delete Nuget.config file under C:\Users\xxx(current user name)\AppData\Roaming\Nuget ,also check whether you have a new nuget.config file on your project parent directory or higher. 3) Close VS, delete Nuget.config file under C:\Users\xxx(current user name)\AppData\Roaming\Nuget ,also check whether you have a new nuget.config file on your project parent directory or higher.

4) delete .vs hidden folder under solution folder, bin and obj folder and then run update-package -reinstall on Package Manager Console ( Tools --> Nuget Package Manger to reinstall every nuget packages. 4) delete .vs hidden folder under solution folder, bin and obj folder and then run update-package -reinstall on Package Manager Console ( Tools --> Nuget Package Manger to reinstall every nuget packages.

5) run Developer Command Prompt for VS2017 as Administrator and then type: 5)管理员身份运行VS2017 的开发人员命令提示符,然后键入:

regsvr32 "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLangproj.olb"

Make sure that the file exists under the path.确保该文件存在于该路径下。 See this document .请参阅此文档

6) repair VS in VS Installer or update it to the latest version. 6)在 VS Installer 中修复 VS或更新到最新版本。

I suggest you could try every step above and give us any feedback about it.我建议您可以尝试上述每个步骤并给我们任何反馈。

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

相关问题 .Net NuGet包多目标.NetStandard 2.0预发行版/.NetFramework v4.6.1与UWP项目兼容 - .Net NuGet package multi target .NetStandard 2.0 pre-release/.NetFramework v4.6.1 compatible to UWP project 在面向 .NET Framework 的 Linux 上构建 NuGet 包 - Build NuGet package on Linux that targets .NET Framework .Net Standard Nuget安装在Framework 4.5项目中 - .Net Standard Nuget install in Framework 4.5 project 如何为.NET Standard创建“ NuGet软件包管理项目”? - How to create “NuGet Package Management Project” for .NET Standard? Visual Studio 2017 无法在 .NET 4.7 项目中安装 nuget 包 - Visual Studio 2017 failing to install nuget package in .NET 4.7 project Visual Studio 2017 Nuget 安装包构建项目而不是安装/卸载包 - Visual Studio 2017 Nuget Install Package Builds Project Instead of Installing / Uninstalling Packages 将 .NET Standard 库打包为 Nuget 包并包含所有项目依赖项/引用 - Package .NET Standard library as Nuget package and include all project dependencies / references 如何(如果有的话)将.NET Framework升级到4.6.1 - How (if at all) do I upgrade .NET framework to 4.6.1 ASP.NET 核心 2.2 - 如何从项目引用的程序集中检索 NuGet Package 依赖项 - ASP.NET Core 2.2 - How to retreive NuGet Package Dependencies from Assembly that a Project References 强制项目引用包含在netstandard nuget包中 - Force project references to be included in netstandard nuget package
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM