See all missing references in VS solution - visual-studio-2013

Does anyone know of a way to easily see all the missing references in all the projects of a solution?
I have a solution with lots of projects and because of missing references it is not building.
So there are lots of errors in the Error List but I can't see at a glance where all the missing references are.
Thanks in advance

Stumbled across the information I was looking for in Visual Studio.
Thought I'd post the answer just in case it helps someone in the future.
To see all the missing references in a solution:
Go to the Error List (View > Error List)
View the Warnings
Any missing references will be displayed here as a warning - "The referenced component 'MyProject' could not be found"
The Warnings have a column "Project", so you can see at a glance which project(s) are missing references.

Related

Can certain compile errors be suppressed in the Error List Dialog?

When compiling a solution with many projects, if I make a compile time error in a project that many other projects use I'll get a flood of errors in the Error List window of visual studio:
Error 80 Metadata file
'C:\trunk\Projects\Libraries\K2DataBaseClient\bin\x64\Debug\CEPCortex.dll'
could not be found C:\trunk\Projects\TradeAiTeacher\CSC
These errors indicate that a project couldn't be built due to another project not being built. These types of errors cascade and don't really tell me anything useful as I know that its all due to a core project failing to build.
These errors often make it harder to find the actual error in the window.
Is there a way to tell visual studio to suppress this type of output and just show me the compile errors in cases like this to make it easy to find what actual code is broken?
Ideally it once the compile error has been fixed we can toggle this hiding off so I see all errors.
I had originally left this version agnostic but visual-studio 2013 is the version I am most concerned with.
No. The C# compiler categorically refuses to consider one error more "important" than another one. It cannot know how important an error can be, it doesn't know enough about the reason it had to produce the error. A missing reference assembly can produce a lot of errors because type definitions are missing. Of course the compiler cannot know the difference between them being undefined because of the missing assembly reference (ignore) or you mistyping a name (don't ignore).
Interpreting the Error List requires a massively parallel computing machine that's capable of high-speed correlation inference and pattern matching. With practical quantum computing still a distant future, you need to use the one that's readily available to any programmer, the one you have between your ears. Start at the top of the list. And work your way down, feeling less inclined to fix them as you progress down the list.
Never hesitate to rebuild before getting to the end of the list when you fixed a gross error. Like a missing assembly reference.
I've found the best way to work with existing the visual studio behavior is to use the advice in this link: and make the compiler stop after the first compile error.
This seems to get as close to solving my problem as you currently can.

VisualStudio 2010 Cannot load class diagram "Exception of type 'System.Exception' was thrown."

In a VisualStudio 2010 solution with many projects one of the projects contains some class diagrams. When I try to open them I get the error message Cannot load '<class diagram file>': Exception of type 'System.Exception' was thrown.
Besides googling (I only found solutions for some different problems) I tried the following things:
removed some and all class diagram content: got the same error
added a new class diagram to the project: got the same error
created a new solution & project, and added a new class diagram: it worked!
created a new solution and added the existing project with the class diagrams: it worked!
deleted SUO and SDF file: got the same error
Any idea how I can fix my solution? Creating a new solution would be possible, but tedious, and I would risk to encounter the same problem again. Because the solution is copy right protected and massive I cannot provide it.
Follow these steps:
Go to Project ยป Properties.
Click on Framework And References.
Remove all the references.
In the properties of the project remove the reference under the Framework And References branch
In the project properties, under Framework and References, remove all references that point to non-existent libraries. (marked with a red X)
This can be caused by an invalid reference.
Project > Properties
Common Properties > Frameworks and References
Locate your invalid references; they are marked with a red line in the GUI and may result in a build warning like "The referenced project '......\foo.vcxproj' does not exist."
Class diagrams now load without error
Other answers suggest removing all references, but you probably only need to remove invalid ones.

Strange build errors with Wix projects

I have a strange build problem in a large solution that includes two Wix projects. Both projects give the following build error:
error LGHT0195: The Windows Installer XML variable 'WixUICostingPopupOptOut' is declared in more than one location.
The file cited for the error is Common.wxs, which I cannot find anywhere. How can I address these errors?
I suspect it has something to do with the experiment held by Bob Arnson to troubleshoot a hard-to-catch issue. In the results of that experiment (part 1 and part 2) Bob advises how to avoid build errors related to the WixUICostingPopupOptOut variable.

Lots of type errors in Visual Studio Error List -- until I build and then they are gone

I recently added a new project to my Visual Studio 2008 solution. Now, as I make edits in the new project, I receive a ton (~50) of type checking errors - indicating that an assembly reference may be missing. However, when I actually build the solution, the errors go away. As best I can tell, my dependencies are set and the build order is correct. What could be wrong?
It doesn't prevent me from building and deploying, but it's a major nuisance. It makes it hard to tell when I actually have introduced new errors (until I do compile). Thus, it erodes the usefulness of having the error window do static analysis.
Example, one of the 50 errors is this:
"The type of namespace name 'PersonManager' does not exist in the namespace 'Gideon' (are you missing an assembly reference?"
In reference to this line of code:
Gideon.PersonManager pm = new Gideon.PersonManager()
PersonManager is underlined in both places, and when I right click the type and selected 'find all references' I get an alert box that says "Cannot navigate to PersonManager"
However, the references are definitely there, because when I build, it works.
One other detail is that there is a mixture of C# and VB.net code, though I don't think that should make a difference.
Well, yes, the IntelliSense parser is not an exact replica of the C# compiler. It has a very different job to do, it needs to do something meaningful while the code is utterly broken since you are editing it. Tough assignment, they did a tremendous job with it. But as a side-effect, it can fail to parse things that are actually legal. It's quite rare but not unheard of, seen it myself a few times.
This won't go anywhere concrete until you at least give us some idea of what kind of errors you are seeing, along with a snippet of the code that generates them. You didn't do so, I can only recommend that you select another window so you don't have to look at them.
I had the same problem. I had a project in my solution that was causing the problem - I removed the project from the solution, then added a reference to that project in the main solution and the errors went away. Strange that it only happened on 1 machine. Opening the solution on another machine was fine...

What is a manifest authoring warning?

Anyone knows what this mean? Care to shed some light?
Got this warning while compiling a MFC project in VS2005.
..\..\..\Shared\res\zenOn_common.manifest : manifest authoring warning 81010002: Unrecognized Element "requestedPrivileges" in namespace "urn:schemas-microsoft-com:asm.v3".
take a look at this thread.:
http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/d9c47905-3d84-4275-b277-9ffe06001f80
It solutes the problem in some cases.
Edit:
It seems that there is/was a problem with manifest files including an date that was older than the build date. Strange...

Resources