Open bdovaz opened 1 year ago
I have narrowed down the problem...
If I have a class with [DllImport], it fails.
using System.Runtime.InteropServices;
namespace ClassLibrary1
{
public class Class1
{
[DllImport("user32.dll", SetLastError = true)]
private static extern uint GetWindowThreadProcessId(IntPtr hWnd, IntPtr ProcessId);
}
}
Instead, if I apply the SYSLIB1054 IDE suggestion and turn it into this:
using System.Runtime.InteropServices;
namespace ClassLibrary1
{
public partial class Class1
{
[LibraryImport("user32.dll", SetLastError = true)]
private static partial uint GetWindowThreadProcessId(IntPtr hWnd, IntPtr ProcessId);
}
}
It doesn't fail anymore...
Really, really, weird...
At least let it be of help to anyone who encounters this until it is solved.
@JoeRobich
With the following command line, it always fails us since we have moved from .NET 6.0.403 SDK to .NET 7.0.100 SDK:
I have omitted sensitive information.