Skip to content

.NET 8 RC1 can not compile with Windows app sdk and CsWinRT #91981

@Gaoyifei1011

Description

@Gaoyifei1011

Description

.NET 8 RC1 can not compile with Windows app sdk and CsWinRT

In.net8 RC1, the Marshal.QueryInterface() method is defined from
public static int QueryInterface (IntPtr pUnk, ref Guid iid, out IntPtr ppv);
Become a
public static int QueryInterface (IntPtr pUnk, in Guid iid, out IntPtr ppv);
Please update the content in WinRT.cs immediately, otherwise the application will not compile

image

Reproduction Steps

In describe bug

Expected behavior

In describe bug

Actual behavior

The Marshal.QueryInterface() method should be compatible with both ref and in arguments

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8 RC1
Windows App SDK 1.4.0
CSWINRT 2.0.3

Other information

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions