Click here to Skip to main content
15,892,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When I tried to open an existing project From Visual Studio 2010

error : The type initializer for 'Microsoft.VisualStudio.Build.ComInteropWrapper.ProjectShim' threw an exception.

Visual Studio 2012

error : The tools version "4.0" is unrecognized. Available tools versions are "12.0", "2.0", "3.5".

the .vbproj file shows toolversion as 4.0

i tried to change tooversion to 4.5 and could not open from VS2012.

When I go to registry, I see tool versions 12.0, 2.0,3.5,4.0 installed.

XML
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.5" DefaultTargets="Build" xmlns="http://ift.tt/PiGwmX">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>
    </SchemaVersion>
    <ProjectGuid>{}</ProjectGuid>
    <ProjectTypeGuids>{}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <RootNamespace>abcd</RootNamespace>
    <AssemblyName>abcd</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <MyType>Custom</MyType>
    <UseIISExpress>false</UseIISExpress>
  </PropertyGroup>


On VS 2010 I get the same error for new project The type initializer for 'Microsoft.VisualStudio.Build.ComInteropWrapper.ProjectShim' threw an exception. Creating website is not an issue.

I uninstalled VS2010, and reinstalled it, same error occurs.

What I have tried:

Honestly, i have no idea therefore tried nothing yet. please guide me through. thank you!
Posted
Updated 21-Jun-16 1:55am
v3
Comments
Richard Deeming 21-Jun-16 10:45am    
Well, this is odd. Your question precisely matches this blog post[^], which claims to have been posted last October.

The blog post seems to be a copy of a deleted StackOverflow[^] question from a user called "Fun Living".

Did you post the original question on StackOverflow?
Engr. S.M. Inuwa 24-Jun-16 5:47am    
Yes this is true, actually i just encounter the error and while searching i found question exactly what is in my mine and decided to post it here may be a better answer could be provided.

because the no answer to the question in this log post

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900