Msbuild: Emit clearer error for built-in tasks that don't work on .NET Core

Created on 10 Jul 2018  路  2Comments  路  Source: dotnet/msbuild

Not all tasks in Microsoft.Build.Tasks.Core.dll are present in .NET Core MSBuild; some weren't ported because of API limitations at the time and some just aren't done yet.

It'd be nice if you got a clear error indicating this, rather than a mysterious one like

C:\Program Files\dotnet\sdk\2.1.301\Microsoft.Common.CurrentVersion.targets(2725,5): error MSB4062: The "Microsoft.Build.Tasks.ResolveComReference" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.  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.
.NET Core Debuggability Tasks

Most helpful comment

Hi @rainersigwald,

Will take this up.

All 2 comments

This was done specifically for ResolveComReference in #3987. That model could be extended to all the tasks we don't build for Core.

Marking as up-for-grabs since we'd take contributions to build more stubs.

Hi @rainersigwald,

Will take this up.

Was this page helpful?
0 / 5 - 0 ratings