使用.inf文件复制到输出目录问题 [英] Copy to output directory issue with .inf file

查看:157
本文介绍了使用.inf文件复制到输出目录问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

道歉,如果重复,我尝试搜索多次,并没有发现像这样... ...
$ b $我有一些'配置'文件,我的应用程序编辑。真的这只是一个编辑这些文件,因为他们有一个特殊的格式。无论如何,每次我把一组新的文件在Visual Studio中,并选择复制到输出目录到复制总是,这工作正常。除了所有其他文件将Build Action设置为None,除了始终将Build Action设置为Resource的.inf文件之外,这将导致它不会被复制到输出目录据我所知)。



我觉得我必须在这里丢失一些东西,因为VS似乎是故意这样做的,所以也许我没有按照最佳做法每次改变它的构建动作到所有其他文件复制到输出目录。

谢谢。

解决方案

是的,默认的Build Action是Resource。 .inf文件扩展名是注册文件类型,用于即插即用安装程序。 c:\windows\inf满了他们。只需将自己的生成操作更改为无或使用不同的文件扩展名。

Apologies if dup, I did try searching several times and found nothing like it...

I have a number of 'config' files that my application edits. Really it is just a gui for editing these files as they have a special format. Anyway, everytime I put a new group of files in visual studio, and select "Copy to Output directory" to "Copy always", this works fine. Except all other files will have "Build Action" set to "None" except the .inf file which will always have "Build Action" set to "Resource"...and this causes it to not be copied to the output directory (as far as I can tell).

I think I must be missing something here, as it seems VS is doing this on purpose, so perhaps I am not following best practice each time I change its build action back to none - to have it copied to the output directory just like all the other files.

Thanks.

解决方案

Yes, the default Build Action is "Resource". The .inf filename extension is a registered file type, it is used for plug-and-play installers. c:\windows\inf is full of them. Just change the Build Action to None yourself or use a different filename extension.

这篇关于使用.inf文件复制到输出目录问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆