将所有文件标记为“嵌入式资源”在视觉工作室中
我正在使用 Visual Studio 2008。
我需要将我的 xml 文件标记为“嵌入式资源”。
我可以通过打开属性选项卡然后选择“构建操作”属性作为“嵌入资源”来完成此过程。我想这是正常的方式。
但我有一个文件夹,其中包含大量生成的 xml 文件(大约 400 个),并且我希望将它们全部标记为“嵌入式资源”。有简单的方法吗?
I am using Visual Studio 2008.
I need to mark my xml files as "Embedded Resource".
I can do this process by opening the properties tab and then select the "Build Action" property as "Embedded Resource". I guess it is the normal way.
But I have a folder that has large number of generated xml files (400 approx) And I want them all to be marked as "Embedded Resource". Is there a simple way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在 VS 中选择所有 XML 文件并将它们全部更改为嵌入式资源,就像处理单个文件一样。
选择所有文件,然后像处理单个文件一样转到“属性”选项卡,并将“构建操作”更改为“嵌入资源”;它将传播到所有先前选择的文件。
You can select all your XML files within VS and change them all to Embedded Resource just as you would with a single file.
Select all the files and then go to the Properties tab just as you would a single file and change the Build Action to Embedded Resource; it will propagate to all the previously selected files.
我相信您要更新的信息存储在 .csproj 文件中。您可以编写一些解析 .csproj XML 以自动更新它的东西吗?
I believe the information you're updating is stored in the .csproj file. Can you write something that parses the .csproj XML to update it automatically?