csproj file conversion to Visual Studio 2010

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
I have started working through examples in Progamming WPF by Chris Sells. At one point I take a csproj file typed in and allow it be converted to Visual Studio 2010.
<?xml version="1.0" encoding="utf-8"?><br/>
<!-- 1st.csproj --><br/>
<Project DefaultTargets="Build" xmlns=" http://schemas.microsoft.com/developer/msbuild/2003 http://schemas.microsoft.com/developer/msbuild/2003 " ToolsVersion="4.0 <br/>
<PropertyGroup><br/>
<OutputType>winexe</OutputType><br/>
<OutputPath>.</OutputPath><br/>
<Assembly>1st.exe</Assembly><br/>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion><br/>
<FileUpgradeFlags><br/>
</FileUpgradeFlags><br/>
<UpgradeBackupLocation><br/>
</UpgradeBackupLocation ><br/>
<OldToolsVersion>2.0</OldToolsVersion ><br/>
</PropertyGroup><br/>
<ItemGroup><br/>
<Compile Include="MyFirstWpfApp.cs" /><br/>
<Reference Include="System" /><br/>
<Reference Include="WindowsBase" /><br/>
<Reference Include="PresentationCore" /><br/>
<Reference Include="PresentationFramework" /><br/>
</ItemGroup><br/>
<Import Project="$(MsbuildBinPath)Microsoft.CSharp.targets" /><br/>
</Project>
if change <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> to
<TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
The tiny little program compiles and builds. However with either verion of that line if I click Project properties I can the following error message:
An error occurred trying to load the project properties window. Close the window and try again.<br/>
Error HRESULT E_FAIL has been returned from a call to a COM component
This is weird as VS2010 can parse the file well enough to build the project however from the properties function it cant.
I can work along through the book anyways but I am curious what is wrong or more likely missing from the above csproj file.
Any ideas?
Thanks,
Frank

View the full article
 
Back
Top