Search code examples
visual-studio-code.net-coremacos-sierrapostsharp

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


I'm trying to build a .netcore 1.1 console project using postsharp 5.0.31 on macOS Sierra, but when I run the command line:

dotnet build

The build fail and show the next output;

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]

It is possible to use .netcore and Postsharp on macOS Sierra?

I need specific configuration?


Solution

  • As of version 5.0, PostSharp does not support building under any OS other the Windows. .NET Core is supported only as a target framework for your projects.

    Please refer to http://doc.postsharp.net/requirements for latest information on compatibility.

    You can also vote for adding support for .NET Core as a build platform on this UserVoice page: Support for CoreCLR as a build platform (including Linux, iOS).