msbuild: Native image cannot be loaded multiple times

This error based on offline discussions:

C:\Users\brthor\code\cli\build\package\Microsoft.DotNet.Cli.Layout.targets(64,5): error MSB4062: The "Microsoft.Build.Tasks.Copy" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Native image cannot be loaded multiple times 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. [C:\Users\brthor\code\cli\build.proj]

Creating a standalone repro of this is proving challenging but I have shared a repro offline with @rainersigwald and @cdmihai

Using this issue for tracking workarounds we are making for this issue.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 68 (50 by maintainers)

Commits related to this issue

Most upvoted comments

@rainersigwald @brthor @cdmihai I’ve been asked to help out with these MSBuild issues, and I’ve already picked up #658. This issue looks to be related (at least to the extent that it has to do with assembly loading).

Would it be possible for one of you to share the repro with me?