Microsoft SharePoint is not supported with version 4.0.30319.225 of the Microsoft .Net Runtime

Posted on Updated on

I was having this exception when I was trying to run either the Update-SPSolution or the Enable-SPFeature

We all know that sharepoint only supports .net 3.5

The problem that I was having here is that I was using a tool PowerGUI to run the powershell scripts.

Apparently this tool has a bug.

After I ran the commands in the normal powershell window, I didnt have this exception anymore

So to fix it:

Since this is a PowerGUI issue, you can fix it by following this solution. Follow these steps.

  1. Open your windows explorer and navigate to C:\Program Files (x86)\PowerGUI\ and open the configuration file ScriptEditor.exe.config.
  2. Change the supportedRuntime version under Startup settings by removing the version=”v4.0″ as below

Final <Startup> element

    <startup useLegacyV2RuntimeActivationPolicy="true">
           <supportedRuntime version="v2.0.50727" />

No you can enjoy the powerful editor again.


Leave a Reply

Please log in using one of these methods to post your comment: 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