我在 macOS Sierra 上使用 postsharp 5.0.31 和 .net core 1.1 时遇到问题,出现构建错误

I'm having issues using postsharp 5.0.31 and .net core 1.1 on macOS Sierra, I'm getting a build error

我正在尝试在 macOS Sierra 上使用 postsharp 5.0.31 构建一个 .netcore 1.1 控制台项目,但是当我 运行 命令行时:

dotnet build

构建失败并显示下一个输出;

MacBook-Pro:PostsharpSample userx$ dotnet build
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.

PostsharpSample -> /Users/userx/Documents/VSCode/netcore/PostsharpSample/bin/Debug/netcoreapp1.1/PostsharpSample.dll/Users/userx/.nuget/packages/postsharp/5.0.31/build/PostSharp.targets(564,5): error MSB4062: 
The "PostSharp.MSBuild.PostSharp30ChangeAppConfig" task could not be loaded from the assembly /Users/userx/.nuget/packages/postsharp/5.0.31/build/PostSharp.MSBuild.v5.0.31.Release.dll. 
Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 
The system cannot find the file specified. [/Users/userx/Documents/VSCode/netcore/PostsharpSample/PostsharpSample.csproj]/Users/userx/.nuget/packages/postsharp/5.0.31/build/PostSharp.targets(564,5): 
error MSB4062: Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/Users/userx/Documents/VSCode/netcore/PostsharpSample/PostsharpSample.csproj]

是否可以在 macOS Sierra 上使用 .netcore 和 Postsharp?

我需要具体配置吗?

从 5.0 版开始,PostSharp 不支持在除 Windows 之外的任何 OS 下构建。 .NET Core 仅作为项目的目标框架受支持。

有关兼容性的最新信息,请参阅http://doc.postsharp.net/requirements

您还可以投票支持在这个 UserVoice 页面上添加对 .NET Core 作为构建平台的支持:Support for CoreCLR as a build platform (including Linux, iOS)