1

I have a C# application and the target framework was 2.0. The app runs fine on Windows 7 and vista without asking users to install any framework.

Since the coming of windows 8 the app does not run anymore. When it runs on the vanilla version of windows 8 the OS gives a message that app requires framework 3.5 and asks them to install it.

My assumption was since Windows 8 comes with framework 4.5 and it should support older api's why should users be forced to install framework 3.5 ?

Should I change the target of my application to be 4.5 ? and if I do so, will the app still run on windows 7 (vanilla) without asking users to have 4.5/4.0 framework ?

Please advise, I want the app to be able to run on multiple frameworks at least 3.5 and 4.0/5 (on vista, windows 7 and 8) without asking them to install frameworks

Thanks

4

1 回答 1

1

Windows 不是 .NET 框架的分发平台,这是 Microsoft 的官方指南。仅仅因为 Windows 7 可能附带默认安装的 .NET 3.5 并不意味着它会存在(它可以被删除)。与 Windows 8 和 .NET 4.5 一样,您需要使用应用程序安装程序提供可再发行组件。就像编译 C/C++ 应用程序时需要使用 Visual C++ 一样。

也就是说,您可以强制 3.5 应用程序在 4.0 中运行,但我强烈建议您不要这样做,除非您要对两者进行广泛的 QA。

如何强制 .NET 3.5 应用程序在 .NET 4.5 运行时上运行?

于 2013-07-06T22:24:46.600 回答