VS2008 Win服务部署项目不创建带有xml文件的子文件夹
我的win服务解决方案有6个项目(Dll)和一个项目,其中包含一个cs文件
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service1()
};
ServiceBase.Run(ServicesToRun);
}
,现在,我向该项目添加了一个子目录,在里面我放置了带有内容类型的xml文件,并且始终在操作中复制。
每次我编译项目并运行 setup.exe 时,它都会自动复制所有内容,但不会创建包含其中文件的新子文件夹。它们根本不是被创造的。
有什么想法如何解决吗?
My win service solution has 6 projects (Dlls) and one project which contain a cs file with
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service1()
};
ServiceBase.Run(ServicesToRun);
}
Now , I added a sub directory to this project , inside I put xml files with type content and always copy in action.
every time I compile the project and run the setup.exe it auto copy everything but does not create the new sub-folder with the files inside it. they are not created at all.
any ideas how to solve it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在安装项目中,将项目输出添加到应用程序文件夹时,选择“内容文件”以及“主输出”。这将确保源项目中标记为“内容”的所有文件都包含在安装程序中。
要检查这是否有效,请在解决方案资源管理器中展开安装项目节点。它应该具有子节点“检测到的依赖项”、“来自 XXXX 的主输出”和“来自 XXXX 的内容文件”。如果右键单击内容文件节点并选择“输出”,您将看到一个对话框,其中列出了将安装的所有文件以及它们到目标目录的相对路径。
In the setup project, when you add project output to the Application Folder, select "Content Files" as well as "Primary output". This will ensure that all files marked as "Content" in the source project are included in the installer.
To check that this is working, expand the setup project node in the Solution Explorer. It should have child nodes "Detected Dependencies", "Primary output from XXXX" and "Content Files from XXXX". If you right-click the content files node and select "Outputs", you will get a dialog listing all the files that will be installed, as well as their relative paths to the target directory.