You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With previous .NET Sdks it used to be possible to target net48 and consume a COM library, without going through hoops.
Now, a simple csproj straight up fails to compile with CS0656 for Microsoft.CSharp.RuntimeBinder.Binder.Convert.
To Reproduce
When building with dotnet build /restore you'll encounter a CS0656. ClassLibrary2.zip
Regardless of Sdk specified in global.json
Repro Code
[ComImport]
[Guid("F7280EAD-C910-42CE-BC19-2E6D4113AB33")]
public interface ITest
{
dynamic VoidTest();
}
public class Class1
{
public static byte[] B(ITest test)
{
return (byte[])test.VoidTest(); // CS0656
}
}
Exceptions (if any)
error CS0656: Missing member "Microsoft.CSharp.RuntimeBinder.Binder.Convert"
Describe the bug
With previous .NET Sdks it used to be possible to target net48 and consume a COM library, without going through hoops.
Now, a simple csproj straight up fails to compile with
CS0656
forMicrosoft.CSharp.RuntimeBinder.Binder.Convert
.To Reproduce
When building with
dotnet build /restore
you'll encounter a CS0656.ClassLibrary2.zip
Regardless of Sdk specified in global.json
Repro Code
Exceptions (if any)
Further technical details
dotnet --info
This worked previously, but installing 8.0.404 or 8.0.307 fails the same way now that .NET 9 is installed - it used to work previously.
The text was updated successfully, but these errors were encountered: