[英]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.