VS2012:查找对一个资源的所有引用 [英] VS2012: Find all references to one ressource

查看:263
本文介绍了VS2012:查找对一个资源的所有引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



也许这是一个愚蠢的问题,但我真的遇到了麻烦。我最近更改了我的项目和表单使用的图标。我没有覆盖旧文件但使用了新文件。现在我想从我的资源中删除旧图标,但如果我尝试编译,我会收到一条错误,说找不到旧图标。我仔细检查了所有表格,并在项目设置中更改了项目图标,但我无法摆脱这个错误。



您对如何建议在我的项目中查找此资源的所有引用,以便可以完全删除它们?什么控制除了表格我可能错过了使用图标?



我也尝试在整个项目中搜索图标的文件名,但它是空的。 />


我正在使用Visual Studio 2012 Professional for VB.NET



任何帮助都会很棒。提前谢谢。

Hi,
maybe this is a silly question but I really have trouble with this. I recently changed the icon that my project and my forms use. I did not overwrite the old file but used a new one. Now I want to delete the old icon from my ressources but if I try to compile I get an error saying that the old icon could not be found. I double checked all the forms and also changed the project icon in the project settings but I can't get rid of this error.

Do you have any advice on how to find all references in my project to this ressource so they can be deleted entirely? What controls besides forms could I have missed that use an icon?

I also tried just searching the whole project for the icon's file name but it comes out empty.

I am using Visual Studio 2012 Professional for VB.NET

Any help would be great. Thank you in advance.

推荐答案

项目文件只是XML,所以我做了一个备份,然后在记事本(或类似的)中进行全局替换。 />
如果我认为我需要多次这样做,我可能会编写一个实用程序来执行此操作。

但总是要确保备份,项目文件可能很脆弱。
Project files are just XML, so I'd make a backup and then do a global replace in Notepad (or similar).
If I thought I'd need to do it many times I might write a utility to do it.
But always be sure to have a backup, project files can be fragile.


你真的不需要找到对资源的​​所有引用。你的工具是编译器。您尝试构建它,编译器将显示使用已删除资源的行。修复一个(或更多,如果你能看到更多)。再试一次。重复,直到所有参考文献都被删除。



-SA
You don't really need to "find all references to resource". Your tool is the compiler. You try to build it and the compiler will show you the line where the removed resource is used. Fix that one (or more, if you can see more). Try again. Repeat until all the references are eliminated.

—SA


这篇关于VS2012:查找对一个资源的所有引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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