General

Today, I tried to make a Release Build of a rather large solution and I got this exception:

Could not load file or assembly ‘file:///C:\some.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) C:\somepath\SGEN

The solution is simpler than it looks like:
The DLL was downloaded from the web and somehow, Windows “blocked”. To unblock it, just right-click the DLL in your explorer and click the “Unblock” button (make sure, you have write access to the file).
That’s all what is needed to fix this problem (at least in my case).

If you need to debug in special condition, like you got a loop and you want to debug the 34th item, you could either set a breakpoint and just skip it 33 times (by pressing f5) or you could simply add a condition to this breakpoint.
You do this by right-clicking the breakpoint and choosing "Condition...".
There you can enter any valid C#-Expression, like "ssList[counter] == 1947635". Now the breakpoint is only hit if this condition is true.

Today, I tried to add the AjaxControlToolkit Controls to my Toolbox in Visual Studio 2008. But when I selected “Choose Items…” in the Toolbox, Visual Studio just crashed without any Errors.

That could happen because of some defect or deinstalled Toolbox Items.

Here’s how to fix that:

  1. Search the Binary devenv.exe
  2. Start it with the command line Parameter /safemode
  3. Use Choosse Items... in the Toolbox
  4. Click thru all the Tabs
  5. Close Visual Studio
  6. Open Visual Studio normally and it should work again