-7

I have created the wpf sample in VS2012 with framework version as 4.0. Then I tried to open that sample in VS2010 in another machine that does not contains VS2012 and framework 4.5 but the sample not opening and throws error. I don't know the reason.

Error Message:

To Run this application, you first must install one of the following versions of the .Net Framework: .Net Framework, Version=4.5

Any one please provide your valuable suggestions.

Abbas
  • 14,186
  • 6
  • 41
  • 72
Muthalagu
  • 156
  • 1
  • 16
  • 4
    valuable suggestion: include error message in your question. – ken2k Jun 11 '13 at 11:47
  • You have to downgrade, see http://stackoverflow.com/questions/12143383/converting-vs2012-solution-to-vs2010 – L-Four Jun 11 '13 at 11:51
  • 3
    Is **To Run this application, you first must install one of the following versions of the .Net Framework: .Net Framework, Version=4.5** not clear enough? – CodeCaster Jun 11 '13 at 12:02

1 Answers1

1

Well, because it hasn't ever been possible to open projects created with a later version of Visual Studio with an older version...

You can not open VS2010 projects with VS2008 and you can not open VS2008 projects with VS2005 etc. If you create a project with VS2012, you'll need to open it with 2012 or later.

What you can do is create a new project in VS2010 and then add the source files. Or think about installing VS 2012 ;-)


I doubt that your sample is really compiled against .NET 4.5. From your edit I take it that you're trying to run the EXE you compiled from your project? Of course when you create a .NET 4.5 project, .NET 4.5 must be installed to run the application!

Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139
  • Thorsten-I have created the sample in VS2012 against framework 4.0 only. Then why it is not running in VS2010(framework 4.0)? – Muthalagu Jun 12 '13 at 06:35
  • As I said: A) You can not open VS2012 projects in VS2010 (downgrading projects is not possible) B) I doubt that you actually selected .NET 4.0 as the project's target. Otherwise it would not ask for .NET 4.5 to be installed - maybe one of the project's dependencies is built for 4.5 only? – Thorsten Dittmar Jun 12 '13 at 10:42