有没有办法在 Mac OS X 上安装 .net framework 4.5.2 或更高版本?

Is there a way to install .net framework 4.5.2 or higher on Mac OS X?

我想在 Xamarin Studio 中使用 .net 4.5.2 框架编译 c# 项目。当我打开项目并查找 Target Framework 时,有 .NET Framework 4.5.2(未安装)。所以它不编译。有没有办法在 Mac OS X 上安装 .net framework 4.5.2 或更高版本?

现在的目标 Mono / .Net 4.5 用于跨平台开发。

Mono 团队正在集成 Microsoft 的参考源,目前正在使用一个配置文件 net_4_x 构建 Mono,并使用其他配置文件的合同程序集。

Mono 4.2.0 Alpha:

While Microsoft is working towards .NET Core: a redistributable and re-imagined version of .NET, the project remains a work in progress. Mono at this point continues to provide an API that tracks the .NET desktop/server version.

This means that most of the code that we have integrated comes from the ReferenceSource drop. In the future, we will deliver a “Mono Core” along the same lines of .NET Core to allow the use of the Mono runtime with the new library distribution system that is being developed with CoreFX.

In this release, we have either ported components that were either incomplete or buggy in Mono and were relatively easy to port to Mono. There is much more to be done in this area. If you are interested in tracking those efforts, check the project status.

Mono ships now with a subset of the referencesource that have been adjusted to work with Mono’s class libraries or have been updated to be cross platform.

如果您只是想针对构建(实际上不是运行),那么参考程序集现在在 nuget 上发布,所以只需添加一个包参考:

<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies"
    Version="1.0.0" PrivateAssets="all" />

您现在可以在 mac 上针对 netfx 构建。这在针对以 netfx 和 .NET Core 为目标的东西进行多目标时最有用,并且在开发过程中你主要 运行ning 针对 .NET Core。