Find Unused Resources in a VS 2012 - visual-studio-2012

So first off I am prefacing this with I know this question has been asked before, it is here Find Unused Resources in a .NET Solution and I feel like it is so old that it is of little value to my current situation.
First here are the specs and requirements for this solution that would fit my needs.
This has to work in/with VS 2012 Premium with Web Essentials 2012 version 2.7
I am committing to a TFS where 4 solutions are calling from a parent solution of common files, so media is split between the main parent solution and some from the children solution. I don't have a ton of choices how this was setup so I have to live with it for the time being but I need to remove unused assets from all 5 solutions I am willing to take something that only lets me go one solution at a time and will just have to do some cross compare.
I have tried normal string text searching into files looking for a specific image etc but there were a number of contractors working on this so some used a standard image reference and some used just css to put in an image via a background. If this could check image issues in css files as well as html files or templates that would be great.

Related

How can I remove Un-used CSS, Images & JS codes in Sublime Text 3

How can I remove un-used CSS, Images & JS codes from my project?
If a project is bigger; usually there are lots of trash codes specifically if the project is built based on another similar project.
May be its late for this answer but, i have the same thinking an i can just tell you to few options.
There is NodeJS powered libraries doing the cleaning unused css selectors. Some of them really smart even if you used merged class name parts in javascript.
You can find those just by google it like "remove unused css"
And, i find the few videos on youtube about same topic. One of them using Visual Studio for this job but i dont tried this. Link here: Youtube Link
Another option is Chrome Dev Tool. Just use chrome developer tools audits tab.
Sorry for little confusing text but i have only those.
I hope it will fix your problem or satisfy expectations.

My APP.xaml doesn't see my Locator declaration any more, is it worth to troubleshoot or recreate solution

I have this issue that I've been spending too much time on.
Working on Visual Studio 2012, on a Windows Phone 8 app, using MVVM Light.
It's a Compile issue that just arose out of the blue. My XAML files are now invalid - but just the XAML files where I try to refer to my ViewModels (event handlers bound to buttons, etc), and the reason for that originates from my App.xaml, where it doesn't see Locator in my myapp.ViewModel namespace, so Locator is now thus seen as invalid.
I've even restored old files from a previous backup from 2 weeks ago, (after copying current files somewhere of course), and the problem still exists. Even just 2 days ago, my app is compiling great.
( btw specifically, when I say Restore, I'm only talking about restoring the subdirectory that contains all of the individual projects, under the Solution directory )
I've tried doing a Git diff, but I only commit xaml's, and cs files, so it didn't show any of my own errors that would cause this.
This seems like some problem with corruption, possibly in a V.S. binary file that I can't see, and I see myself spinning wheels, and not knowing what code to paste her in stackoverflow.
At what point do you just say : "Let's just create a brand new solution " ?
I'd hate to do that, and then the same thing happens again though next week.
However, I'm moving toward a philosophy which says: "dude, get used to doing a re-do, since this stuff happens". (I'm going to just write a Checklist for how to create a solution from new, with all the packages I need, so it's not such a bummer to start fresh.)

Any way to apply an exclude list to the Visual Studio "Navigate To"-list?

I'd like to exclude code-generated files from the Edit > Navigate To-list which appears when hitting Ctrl+, in Visual Studio 2013, as these files are never to be modified by me manually and in those rare cases where I want to see the contents of them, I'll use the solution browser. Is there any way to do this? They produce a lot of noise in my search and greatly reduces the value of the Navigate to-function.
Edit Nov 2016: added an image for illustration in VS 2015. Very much an issue still. The first search hit is a .g.cs file in the obj-folder:
I assume that by "code-generated files" you are referring to files such as .designer that are also part of the solution (and found in solution explorer). After quite a bit of research into Navigate To I was unable to find any reference to such a configuration option. Currently there appears to be only 3 options for configuration (discussed in the MSDN blog below). A possible work around would be to leverage the built in filtering features of Navigate To (#, Capitalization and Whitespace) that are new to VS2013 as outlined in this MSDN blog:
http://blogs.msdn.com/b/mvpawardprogram/archive/2013/10/22/visual-studio-2013-navigate-to-improvements.aspx
Another article I found in my research: http://weblogs.asp.net/scottgu/archive/2009/10/21/searching-and-navigating-code-in-vs-2010-vs-2010-and-net-4-0-series.aspx
UPDATE: I use the ReSharper plugin and only after posting this answer realized there is a Filter results from generated files feature to exclude generated files and is discussed at the link below. Though it does not pertain to Navigate To, it may provide a satisfactory alternative:
http://www.jetbrains.com/resharper/webhelp/Reference__Options__Environment__Search_and_Navigation.html
UPDATE (12/1/2015): Now that some time has passed I decided to do a little more research and found a similar request posted on SO here. I found this to work pretty well, and VS will even save the list for you.

project references are "lost" after getting latest from TFS

I have a solution with many projects. This is actually a solution that contains a mix of class libraries and various web applications. It seems that if my colleague makes a change to one of the web projects (or if I do) and then check it in. And then when either one of us gets the latest version project references become broken. They still appear in the references section with no indication of an error, but when you try to compile it cannot see the libraries.
To solve this I have to remove the references and add them back in. Any ideas on what may cause this problem?
Make sure that the paths are relocatable, that you both have the same paths on your PCs (i.e. that you have not used TFS workspace mappings to put different folders in different places), and that you don't move projects around or rename folders etc.
Even when everything is clean and tidy, Visual Studio will occasionally decide it can't find a file that's right under its nose, or that a file somewhere else on your system looks prettier, and it will break the reference. You just have to delete and recreate it in this case. But this usually happens once a month in a team of 10-20 people, and should not occur every time you check in.

Getting started with Xcode 4.2

I have recently got a Mac and I have downloaded Xcode 4.2 from the store. I am trying to get to grips with iPhone development but I am having real troubles. All the tutorials I seem to find online, when they create a project, they had a resources folder, and inside that there is xib file which allows them to use an interface builder.
This does not appear on 4.2, so makes it kinda hard to follow majority of tutorials have the resources folder. How do I get this back? Or how do I access this file on 4.2?
Also, I could someone explain to me where the objects list is? I started following this tutorial
http://maybelost.com/2011/10/tutorial-storyboard-in-xcode-4-2-with-navigation-controller-and-tabbar-controller-part1/
as it seemed to be using Xcode 4.2, but when I get down to the storyboard section, it says
"Of course, we really want another tab on there so we can see the switching between the two – so lets drag in another Navigation Controller from the Utilities (objects) list and plonk it down somewhere. "
Except I cannot find this objects list? How do I open this objects list? What am I missing?
Sorry if these questions seem very basic, I am new to both Macs and iPhones. Android development seems a HELL of a lot easier from what I can see so far.
Thanks in advance for any help.
Also would be grateful if anyone could point in direction of any good up to date tutorials
I have a post on http://www.armandvanderwalt.co.za it will give you a nice understanding of how most stuff fits together, I don't use Interface Builder at all since it only makes the app bigger. Have a look at my blog post, still need to do styling, and add more posts but it is a nice beginner guide.
Most posts you are finding still use XCode 3 that's why you can't find certain things.
Also have a look at http://www.raywenderlich.com
What they are referring to as the object list, in XCode 4 it is found in the bottom right corner of Interface Builder. In XCode 4 Interface Builder is part of XCode and no longer an external application. Therefore when ever you open a XIB file Interface Builder also automatically opens

Resources