问题
I have very little knowledge on apps for Desktop.
I created a Simple app for Windows 8 using the free Visual Studio Express 2012 for Windows 8 (in C#, XAML).
Now I am wanting that app to run on other Windows platforms like Windows XP, Windows 7 etc. I understand, that Metro apps can't run on Windows 7 or XP, but All I want is stripped down version of my app which runs on Windows 7 and XP as well.
I am looking for options like Project->News->Target Windows XP... I also have another question, Can we use XAML,.CS approach even for Windows XP.
How can I port my existing Windows 8 app to WIndows XP, 7 with minimal effort and using C# and making use of current set up ( Visual Studio Express 2012) ?
回答1:
First of all choose .Net Framework 4.0 as a target framework. (This window appears after clicking create new project)
You can either choose WPF application or Windows Forms Application. But WPF is recommended if you know how to work with .Xaml
回答2:
In order to get your app to run on Windows 7 and Windows 8 you need to:
To set your Target to .Net 4.0.
File->New->Project
At the top of the dialog there is a list that allows you to select the framework.
see this link
Make sure the .Net 4.0 Framework is installed on the machines you wish to deploy to.
see this link
If you want the framework to distribute with your app so you don't have to install the framework on each machine,
see this link.
回答3:
To develop applications for Windows XP or similar, you need to download and install a special edition of Visual Studio 2012 Express, named for Windows Desktop,
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop
http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx
Don't use the so called "for Windows 8", as that can only create Windows Store Apps.
来源:https://stackoverflow.com/questions/18627628/how-to-create-an-app-for-windows-xp-using-visual-studio-express-2012-for-windows