简体   繁体   中英

Any way to check if a css file is referenced somewhere in the solution? Visual Studio

I am working on updating all of the CSS files and want to make sure the old files arent referenced anywhere in the solution. I guess I could always do a Ctrl+Find of the following:

<link rel="stylesheet" href="/Content/front/css/style.css" />

but I was hoping to be able to have a quick way to see how many times and where the file is being referenced. Similar to how you can do code inspection for various classes you call throughout the project.

Any help would be awesome. Working in VS 2013 Ultimate.

You could try running the code with the old file deleted and look for all of the errors that the code throws. (All of the can't find file errors)

Note: For all of you programmers that see this and feel like crying. I know that this is not the cleanest way of doing this but it should work and is easy to do. Let me know if there is a better way of doing this.

Use the Developer Tools in Chrome to find out the local resources your page is using. Press Ctrl + Shift + I on Chrome and go to the Sources tab, then compare them to your project files and delete what you do not need.

从源文件目录中的 cmd 文件运行它

find -i-n *.*  "css">>Results.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM