Reputation: 121
Im trying to run the demo(firstlink) which can be found on the second link half way down the page, underneath the pucture. Its a wpf project, and when i try and open it, visual studio gives me an error message.
http://dl.dropbox.com/u/2600965/Blogposts/2010/08/GraphSharpDemo.zip
http://sachabarber.net/?p=815&cpage=1
The error message i get in visual studio is
"The selected file is a solution file, but was created by a newer version of this application and cannot be opened".
I am running visual studio 2008, .net 3.5. Does this mean i just cant run this programme at all? Also, i tried to manually copy the code from the example in to my own project, but i had no idea what i needed to do with the 2 .xaml files.
Thanks for reading
Upvotes: 0
Views: 747
Reputation: 24453
Open the .sln file in a text editor and replace the first lines which currently specify VS2010 with the VS2008 versions:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
You'll also need to convert the contained project back to .NET 3.5 from 4.0. To do that, open the .csproj in a text editor and replace the 4.0 specific settings. Here's the section of the file that contains those settings with the replacement values:
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{455C90CF-CB4E-41FB-8DB8-04AD1B104F64}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GraphSharpDemo</RootNamespace>
<AssemblyName>GraphSharpDemo</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
After opening you'll need to remove some missing assembly references because a few new common dlls were added in 4.0.
Upvotes: 0
Reputation: 30892
A solution file is little more than a list of the contained files.
Create a new solution, and add the provided files using Add -> Existing Item in the solution explorer. Pick the .xaml files, and if necessary, the .xaml.cs files.
Upvotes: 0
Reputation: 245429
Obviously the project was created with Visual Studio 2010.
I have no idea if the steps listed here work, but you might try following them to convert the Visual Studio 2010 Solution to a Visual Studio 2008 Solution:
Converting a Visual Studio 2010 Project to Visual Studio 2008
...of course this won't help if the sample project targets .NET 4.0, but it might be worth a shot.
Upvotes: 2
Reputation: 517
Perhaps the project was created by Visual Studio 2010? Just a thought...
Upvotes: 2