3

I'm trying to follow the instructions located at How-To Create a Hello World Snap-in using Visual Studio 2010 and it tells me I need to reference Micorosft.MagamentConsole.dll which can be found in the MMC 3.0 SDK, which is in turn part of the Windows SDK.

My problem is that I already have the Windows SDK installed (specifically the Microsoft Windows SDK for Windows 7, both versions 7.0 and 7.1 (I'm not sure what the difference is)) however I cant find the required Microsoft.ManagementConsole.dll assembly anywhere:

  • Its not listed in the .Net tab of the Add reference... dialog in Visual Studio (even if I change the project target framework to .Net v2.0)
  • Its not in any of the Microsoft SDKs\Windows folders in either the Program Files or Program Files (x86) directories
  • Its also not in the Visual Studio 2010 installation directory
  • And its also not in c:\Windows\System32 (as one guide I found on the internet suggested that it might be)

Where can I / should I reference this assembly from?

Justin
  • 84,773
  • 49
  • 224
  • 367

2 Answers2

6

On my system it is located in %ProgramFiles%\Reference Assemblies\Microsoft\MMC\v3.0. That location, "reference assemblies", also suggests it is the place you should include it from.

Christian.K
  • 47,778
  • 10
  • 99
  • 143
  • The folder `MMC` is missing on my machine, it looks like I need to install a different version of the Windows SDK... – Justin Mar 27 '12 at 11:10
  • Yes, maybe. Note that the SDK (i.e. the x.x _A_ versions) that ship with Visual Studio are not the full Windows SDKs. So it might be that you need to install just that. On my machine, however, I have never installed a full SDK (only the ones that come with VS). – Christian.K Mar 27 '12 at 11:17
  • Okay I'm now part way through the installation of the [Windows SDK for Windows 7 and .NET Framework 3.5 SP1](http://www.microsoft.com/download/en/details.aspx?id=8279) and this file seems to have appeared. – Justin Mar 27 '12 at 12:03
  • I know that the MMC assemblies are targeted at the CLR v2.0 runtime (presumably to avoid conflicts with v2.0 and v4.0 assemblies trying to run in the same process), my theory is that as a result these files aren't installed as part of the .Net 4.0 flavour of the SDK and you need to explicitly install the .Net 3.5 version too. – Justin Mar 27 '12 at 12:33
2

This worked for me

project -> Add Reference -> Browse -> paste this value C:\Windows\assembly\GAC_MSIL\microsoft.managementconsole\3.0.0.0__31bf3856ad364e35\microsoft.managementconsole.dll

Notes:

  1. You can not browse to the above location using windows explorer
  2. However you can go to the above path in command line
Sunil Purushothaman
  • 8,435
  • 1
  • 22
  • 20