WPF Application Issue Upgrading 2008 to 2010.

Just ran into another upgrade issue moving to Visual Studio 2010.  This time it was with a WPF Application.  When I went to open the properties window for the application in Visual Studio 2010 it gave me the error:

“An error occurred trying to load the project properties window.  Close the window and try again.  Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))”

Ugh.

I did a bit of searching to find the answer but then remembered that I had a some luck the other day in a similar situation with Windows Azure that I was able to resolve by comparing a new project file with the one I had.  What I found was that the configuration property groups were missing.

Solution

Copy the configuration property groups from the new project file to the one that does not work.  You will need to update the configuration setting if you have changed them from the defaults.  If you did take a backup that would be the best place to get your setting values from, however, consider that these groups may have gone missing in the first place due to some invalid setting value.

Here is an example of the standard configuration property groups for both Debug and Release on x86.

<PropertyGroup Condition=” ‘$(Configuration)|$(Platform)’ == ‘Debug|x86’ “>
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=” ‘$(Configuration)|$(Platform)’ == ‘Release|x86’ “>
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

Hope this will save you some hair!

Explore posts in the same categories: Visual Studio, WPF

Tags:

You can comment below, or link to this permanent URL from your own site.

One Comment on “WPF Application Issue Upgrading 2008 to 2010.”

  1. GW Says:

    super sweet, thank you.


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s


%d bloggers like this: