Ed Clarke’s In a Nutshell

And He Needs Help Getting Out

Archive for the ‘visual studio’ Category

#Region issues

Posted by edc73 on July 8, 2008

Good points made by Jeff Atwood concerning issues with #Regions in the Visual Studio editor. I admit that when I first started doing .NET, I fell into the trap very easily. Now it’s just a pain. Pain to keep the organization straight, pain to read/scan the code. Just the other day I was having trouble searching for text, finally realized it was part of a collapsed section and therefore being ignored. Grrr..

Posted in visual studio | Leave a Comment »

Project References

Posted by edc73 on June 28, 2008

This issue keeps popping up in our environment, so figure I’d put out this quick tidbit:

When adding references to libraries that exist within the solution, you should make sure you add the reference via the Project tab, not the Browse tab.  This means you will have to have the target project loaded in the solution to add the reference.

If you don’t do this, command line builds will still be ok, but builds within the IDE can get all messed up due the the build order not being what it should be.  In general, you will get error messages indicating TypeA can not be converted to TypeA, which doesn’t make any sense.  What’s really happening is TypeA in the dll can not be converted to TypeA in the currently loaded project.

Once you fix the references, all should be good again.

Posted in .net, visual studio | Leave a Comment »