问题描述
大家好,
我正面临Nuget软件包安装问题。我正在使用 VS 2017 Enterprise 和
Asp.Net MVC ,包参考
Nuget Formating 即可。我创建了一个Nuget包并尝试将其安装到另一个项目中。
I am facing issue with the Nuget package installation. I am using VS 2017 Enterprise andAsp.Net MVC with Package Reference for Nuget Formating. I have created a Nuget package and trying installing it into a different project.
包创建很好,因为我可以通过Nuget zip文件在Nuget包中看到正确的文件结构。
Package creation is fine because I can see the proper file structure in the Nuget package via Nuget zip file.
然而,当我尝试将其安装到不同的项目中时,代码文件没有下载,Nuget包正在直接添加引用。
However, when i am trying installing it into different project, the code files are not downloading and Nuget package is adding under the reference directly.
我不是确定问题是什么?任何帮助将不胜感激。
I am not sure what's the issue? Any help will be appreciated.
谢谢,
Kuldeep
Kuldeep
推荐答案
欢迎来到MSDN论坛。
Welcome to MSDN forum.
>> 我创建了一个Nuget包,
代码文件未下载
>>I have created a Nuget package,the code files are not downloading
什么你收拾nuget包的方式吗?据我所知,我们有很多方法可以创建一个nuget包。
Hi, what way do you pack the nuget package? As I know, we have many ways for creating a nuget package.
1.对于.net核心/标准classlibrary项目,我们可以通过右键单击项目选择'pack'选项
1.For a .net core/standard classlibrary project, we can choose 'pack' option by right-click project
2.此外,我们可以调用nuget.exe或dotnet命令等
2.Also, we can call nuget.exe, or dotnet command etc
并且通过类似#1的方式,因为我知道.nupkg将不包含代码文件(xx。 cs文件)。
And by a way like #1, as I know the .nupkg won't contain the code files(xx.cs files).
>> Nuget包直接在引用下添加
你的意思是xx.dll被添加到你的项目中,项目类型是什么,因为我测试我的那边,.dll将在我安装.nupkg后直接添加到解决方案资源管理器中的参考节点。我认为这是正常的行为,但我不确定
这一点。因此,如果我误解了任何内容,请随时告诉我:(
Do you mean the xx.dll is added to your project and what's the project type, as I test on my side, the .dll will be added to the reference node in solution explorer directly after I install the .nupkg.I think it's normal behavior, but I'm not sure about this point. So if I misunderstand anything, please feel free to let me know :(
有关此主题的更多详细信息可以使问题清楚,并帮助解决问题。期待您的回复!
More details with this topic could make the issue clear for me and help trouble-shooting. Looking forward to your reply!
此致
Lance
这篇关于安装nuget包的问题 - VS 2017企业版+ Asp.Net Web应用程序(.Net Framework)空项目+ .Net Framework 4.7.1 +用于Nuget格式化的已用包参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!