Follow-up on ‘Can’t Find .NET Framework Class Methods’

Ok so after figuring out why the PowerShell ISE wasn’t loading the appropriate .NET Framework I added the registry key to enforce that .NET Framework v4.0 always loaded – bad idea. When you do this it means that the .NET Framework v4.0 will be loaded instead of the .NET Framework version you selected for that particular Visual Studio project. This results in a variable array of ‘could not be resolved because it has a higher version’, ‘type or namespace could not be found’, and ‘predefined type is defined in multiple assemblies in the global alias’ warnings and errors.

To get yourself back to a usable state, delete the registry keys out. Below are the commands that will let you do this from the commandline.

reg delete hklm\software\microsoft\.netframework /v OnlyUseLatestCLR
reg delete hklm\software\wow6432node\microsoft\.netframework /v OnlyUseLatestCLR

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s