Blog Stats
  • Posts - 94
  • Articles - 0
  • Comments - 10
  • Trackbacks - 0

 

Visual Studio

Tips, tricks, useful things with Visual Studio

Embed Resources into your .Net Projects

Worrying about file paths, locations, availability, and security of your project's resource can be a real pain.  Fortunately, you can easily embed resources into your project's DLL and reference them with ease from your code.  Here's an example of how to reference an embedded XSD: First, to embed the resource, right click on the file and choose Properties.  Next, switch the Build Action on the file to Embedded Resource. Now, when you compile your project, your resource will be compiled into the DLL with the default namespace of the project/folder location of the file within your project, e.g. if your default...

Fix FireFox SLOWdown on Vista while Debugging localhost

If you use FireFox to debug on Windows Vista, you most likely have noticed how ridiculously slow it is rendering localhost requests versus Internet Explorer.  No, this isn't a conspiracy, just an issue with IPv6, FireFox, and Windows Vista. To fix this issue, do the following: 1) Open up about:config in your FireFox browser 2) Filter or scroll down to network.dns.disableIPv6 and set this value to true 3) Restart FireFox and you should be good to go!

Format Document - The Quick HTML and Code Organizer

I have encountered a lot of bad HTML formating in my days, and one quick way to organize the HTML files via Visual Studio 2005 is to use the Format Document option from the Edit menu. One thing about the default settings for Format Document (or Selection), is that it will wrap lines by default, which to me, can be undesirable.  To change this setting, go the Tools -> Options and then navigate the tree to Text Editor -> HTML -> Format, and uncheck the Tag Wrapping check box towards the bottom of the page. Here too you can set any specific...

Intellisense for MSBuild files

To “enable” Intellisense for MSBuild projects ending with the extension “msbuild”: 1)      1) Add this registry key (no line break in the key): [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Editors\ {412B8852-4F21-413B-9B47-0C9751D3EBFB}\Extensions]"msbuild"=dword:00000029 2)      Create a file called “test.msbuild” and then try to open it.  Choose “Select program from list” and browse to VS2005 devenv.exe and check “Always use the selected”.  Click ok.  Once Visual Studio opens, you should have it!  (Since the XSD for MSBuild is already “known” by Visual studio.  Fyi – the file is located here: \windows\Microsoft.NET\framework\v2.0.50727\Microsoft.Build.xsd and \Program Files\Microsoft Visual Studio 8\xml\Schemas\1033 there. If you don't like using the .msbuild extension, you can change it.  Just modify the registry key, changing "msbuild"...

 

 

Copyright © Greg Steen