Although the command line caspol can do everything, I, like most users - prefer the mmc snapin (mscorcfg.msc) much better for small quick interventions.
It used to be installed by default with every framework, but as I'm sure you've noticed, since 2.0, it is only installed if you install the SDK...
I've always thought that as weird, but didn't have time to look into it.
Today I came across the official blurb of their policy:
The .NET Framework Configuration tool (Mscorcfg.msc) is a Microsoft Management Console (MMC) snap-in that enables you to manage and configure assemblies in the global assembly cache, adjust code access security policy, and adjust remoting services.
In the .NET Framework versions 1.0 and 1.1, Mscorcfg.msc is installed with the NET Framework redistributable package. In the .NET Framework 2.0 and later versions, Mscorcfg.msc is installed with the .NET Framework 2.0 Software Development Kit (SDK).
If you have both the .NET Framework 1.1 and 2.0 runtimes, you will have version 1.1 of the configuration tool, but you might not have version 2.0. If you want to manage .NET Framework 2.0 and later versions by using the configuration tool, you must install the .NET Framework 2.0 SDK. To change configuration settings for a computer that has multiple versions of the .NET Framework, you must make the changes in the matching versions of the configuration tool.
Note:
The .NET Framework versions 3.0 and 3.5 are built incrementally on the .NET Framework version 2.0. The configuration tool included in the .NET Framework 2.0 SDK is the latest version of the tool. You can use this version to manage code access security policy for the .NET Framework 3.0, 3.5, and later versions as well.
As usual...doesn't tell me much as to the reasoning of why it was removed...but at least, its "official", and I haven't missed an easier way of installing just the tool and leave the SDK download to others.
Which means I'm off to re-download 354Mb of stuff... just to get my hands on a tiny little tool...
Except...SDK 3.5 now supercedes SDK 2.0
But when you get to the SDK 2.0...you get the following blurb...
NOTE: This version of the .NET Framework SDK SDK has been superceded by the Windows SDK for Windows Server 2008 and .NET Framework 3.5. This version of the Windows SDK is available as either a
Which means I'm off to download the 3.5 SDK...with a size of....1330.0 MB !!!
Don't you just love these wild goose chases?
The Stupid Dog
Only problem...an hour later....is that after downloading and repairing what I've got on the computer...Not there! I even pulled out The Stupid Dog to see if it could find it:
Score so far? I've downloaded 1330 Mb to get just 41Kb ...WOW!
SDK 2.0 ...
So I have to now go back to Microsoft..this time to download the SDK 2.0 since those are the last known un-ambiguous instructions as how to get the Mscorcfg.msc
While Waiting for the Download to come in...Back to the Stupid Dog
Hum...look at that ...one of the files that Stupid Dog brought back is a .NET assembly...
Not in the location I expected...but maybe it would work?
Nothing to lose while waiting, by clicking, right?
What I get is;
Hum. Maybe I need to register the DLL with the same name? Maybe -- but is it a COM or NET assembly? Should be a .NET one...
Turns out it is:
So if my theory is right...just REGASM the mscorcfg.dll and it should work...
But no....Get an error saying its looking for a different version.
Almost though...
What's happening is the Stupid Dog brought back a very old version -- a Mscorcfg that is for 1.0. I would have seen that earlier if I had scrolled right and looked at the LastModifiedDate of the files... but I'm so friggin ticked off at this whole waste of time that I'm fuming in general:
So it's not registering on this machine. Close...I'm sure I'm on the right track...but no cigar yet.
It seems that there's nothing else that I can do except wait for the download of version 2.0 SDK. Rats.
Waiting...
Waiting....
Waiting...
GROWL!!!
This ...is ridiculous.
Can't believe it....1.5 Gb of download to find a 41kb tool.
Shame on you MS, either for the instructions, or packaging...or both.
Finally...Stupid Dog brings back:
Which means I can try my theory:
First unregister it...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm /unregister "C:\Program Fil
es\Microsoft.NET\SDK\v2.0\Bin\mscorcfg.dll"
Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.3053
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
Types un-registered successfully
And I get right back to the error I had before...
Regasm it again:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm "C:\Program Files\Microsoft
.NET\SDK\v2.0\Bin\mscorcfg.dll"
Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.3053
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
Types registered successfully
And it works!
So...moral of the story...it appears that next time don't download the SDK's -- you just need a zip containing the two files:
mscorcfg for 2.0 The Files
...and REGASM.exe (version 2.0)