What causes error MC1000: Unknown build error, 'Could not find assembly 'System.Runtime.InteropServices.PInvoke...'

Viewed 1885

The full error information is

Code: MC1000

Description: Unknown build error, 'Could not find assembly 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.'

File: C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 243

I'll provide a little context in case it's helpful. This is in a .NET Core 3.0 WPF project, that references a .NET Core 3.0 Console App, that references a .NET Standard 2.0 Class Library. All levels except the top level WPF project also reference a slew of Nuget packages, most of which are probably targeting .NET Standard 1.3 or 2.0. They are all targeting a compatible .NET Standard, I don't have any that are throwing the NU1701 warning.

So the question: what is causing this error?

0 Answers
Related