Copy to output directory issue with .inf file

若如初见. 提交于 2020-01-16 08:40:12

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/2083100/copy-to-output-directory-issue-with-inf-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!