Drag and drop a DLL to the GAC (“assembly”) in windows server 2008 .net 4.0

In .net 4.0 Microsoft removed the ability to add DLLs to the Assembly simply by dragging and dropping. Instead you need to use gacutil.exe, or create an installer to do it. Microsoft actually doesn’t recommend using gacutil, but I went that route anyway. To use gacutil on a development machine go to: Start -> programs … Read more

Does the .Net Framework 4.0 Installer include the .Net Framework 3.5?

The .NET 4.0 installer doesn’t include the .NET framework 3.5. There is some information on this topic in MSDN: The .NET Framework 4 is highly compatible with applications that are built with earlier .NET Framework versions, except for some changes that were made to improve security, standards compliance, correctness, reliability, and performance. The .NET Framework … Read more

Differences between .NET 4.0 and .NET 4.5 in High level in .NET

What is new in .NET Framework 4.5 & What’s new and expected in .NET Framework 4.5: Support for Windows Runtime Support for Metro Style Applications Support for Async Programming Garbage Collector Improvements Faster ASP.NET Startup Better Data Access Support WebSockets Support Workflow Support – BCL Support differences in ASP.NET in these frameworks Compare What’s New … Read more

What is wrong with ToLowerInvariant()?

Google gives a hint pointing to CA1308: Normalize strings to uppercase It says: Strings should be normalized to uppercase. A small group of characters, when they are converted to lowercase, cannot make a round trip. To make a round trip means to convert the characters from one locale to another locale that represents character data … Read more

Windows SDK 7.1 Setup failure

With Windows 10 x64, the setup is blocked by: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full\Version HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client\Version Change both values temporarily to 4.0.30319 and the setup will let you continue. Make sure you edit the registry with elevated privileges, otherwise you will not be allowed to change the values.

read string from .resx file in C#

ResourceManager shouldn’t be needed unless you’re loading from an external resource. For most things, say you’ve created a project (DLL, WinForms, whatever) you just use the project namespace, “Resources” and the resource identifier. eg: Assuming a project namespace: UberSoft.WidgetPro And your resx contains: You can just use: Ubersoft.WidgetPro.Properties.Resources.RESPONSE_SEARCH_WILFRED

Unable to load SOS in WinDbg

The CLR runtime dll was renamed to clr.dll with .NET 4. So in order to load the correct version of SOS you need to adjust your .loadby command. I.e. .loadby sos clr Also, if you’re on 64 bit, you should install the 32 bit version of Debugging Tools for Windows as well in order to … Read more

Get current scroll position from rich text box control?

This should get you close to what you are looking for. This class inherits from the RichTextBox and uses some pinvoking to determine the scroll position. It adds an event ScrolledToBottom which gets fired if the user scrolls using the scrollbar or uses the keyboard. public class RTFScrolledBottom : RichTextBox { public event EventHandler ScrolledToBottom; … Read more

tech