msbuild
msbuild copied to clipboard
MSB4062 when a TaskHost task ships MSBuild assemblies
Reported internally over email in a thread titled Need help with investigation MSBuild Task load problem
.
If a task ships MSBuild assemblies in its folder, the new MLC code can cause errors like
error MSB4062: The "SOMETHING" task could not be loaded from the assembly PATH.
The assembly 'Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already loaded been loaded into this MetadataLoadContext.
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.