我一直在使用 Visual Studio Community 2015 开发 .NET 3.5 C# 项目,但我一直打算使用 Mono 和 MonoDevelop 在 Linux (Ubuntu Gnome 15.04) 上进行大部分开发。
我正在运行最新稳定的 Mono 版本 (4.0.4) 和 MonoDevelop (5.9.6),它支持 .NET 4.5 并且可以毫无问题地打开 VS 创建的解决方案文件。
十年来,我一直在 Linux 上编写 C++ 应用程序,但 C# 和 .NET 对我来说是全新的。所以我假设如果我安装了支持 .NET 4.5 的 Mono 版本,我也会得到 .NET 3.5,因为新版本是旧版本的超集——很像 C++14 编译器支持 C++03。
然而,情况似乎并非如此,正如 MonoDevelop 所述(在每个项目的 Target Framework 选项下):
- .NET Framework 4.5.1
- 单声道/.NET 4.5
- Mono/.NET 3.5(未安装)
那么我是否必须安装并行的较旧版本的 Mono 才能获得 .NET 3.5 支持,或者我只是遇到了配置问题?
最佳答案
没有配置问题,Mono 在 4.x 版本中放弃了对旧框架的支持。如果您需要针对 3.5 程序集编译,那么是的,您将需要并行安装。
Dropped Support for Old Frameworks
Reference Assemblies
We no longer build the reference assemblies for the .NET 2.0, .NET 3.5 or .NET 4.0 APIs, we now ship binaries of the reference assemblies (API contracts, without any actual executable code in them).
Mono will now only build the .NET 4.5 assemblies as well as the mobile-based profiles.
Note: You can still run assemblies compiled for earlier .NET profiles on Mono, there’s no need to recompile them (they’ll just run on the .NET 4.5 assemblies instead).
关于c# - 旧版本的 .Net 没有安装最新的 Mono?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33185770/