[英]Visual Studio 2017 Installer Project not showing any dependencies
I'm using Microsoft Visual Studio Community 2017 (version 15.4.4), with the Visual Studio Installer Extension. 我正在使用带有Visual Studio安装程序扩展的Microsoft Visual Studio Community 2017(版本15.4.4)。 I have an existing C# .Net Core 1.1 console application with four Nuget packages listed as dependencies in my solution, and I have added an Installer project to this solution to build a Windows application setup program.
我有一个现有的C#.Net Core 1.1控制台应用程序,在我的解决方案中列出了四个作为依赖项的Nuget程序包,并且我已经向该解决方案添加了Installer项目,以构建Windows应用程序安装程序。
I've ticked the "primary output" option to include the built DLL, however when I look at the Dependencies folder in the Solution Explorer it is empty. 我已经勾选了“主要输出”选项以包括内置的DLL,但是当我在解决方案资源管理器中查看Dependencies文件夹时,它是空的。 Right-clicking "Refresh Dependencies" on this folder does not do anything for me.
右键单击此文件夹上的“刷新依赖关系”对我没有任何帮助。
When I build the release for the installer project, the end .msi file and setup.exe don't include or otherwise install any of the nuget packages. 当我为安装程序项目构建发行版时,.msi最终文件和setup.exe不包含或以其他方式安装任何nuget软件包。
The output console when I build the setup package just lists my runtimeconfig.json file and dll when it is packaging, and the runtimeconfig.json file only has the following in it: 生成安装程序包时,输出控制台仅列出打包时的runtimeconfig.json文件和dll,并且runtimeconfig.json文件中仅包含以下内容:
{
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "1.1.2"
}
}
}
Have I missed something? 我错过了什么吗? What might I need to do to get the nuget packages recognized as dependencies and added to the install files so they get deployed by my setup.exe?
我需要怎么做才能将nuget软件包识别为依赖项并添加到安装文件中,以便它们通过我的setup.exe进行部署?
Thanks stuartd and Leo Liu. 谢谢stuartd和Leo Liu。 For the moment I've followed the method of Build > Publish > publish to a folder, and then zipping that folder up for distribution.
目前,我遵循Build> Publish> publish到文件夹的方法,然后将该文件夹压缩以进行分发。
I did have to copy the dll file into the obj\\x64\\Release\\win-x64 directory after building for this to work. 构建后,我确实必须将dll文件复制到obj \\ x64 \\ Release \\ win-x64目录中。 I was getting an error that the file wasn't found.
我收到一个找不到文件的错误。
This solution means I need to provide some more steps to the end users about how to set up the program to run, but at least it works. 此解决方案意味着我需要向最终用户提供更多有关如何设置要运行的程序的步骤,但至少可以运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.