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
{{ message }}
Repository navigation
.NET 8 RC1 can not compile with Windows app sdk and CsWinRT #91981
.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
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
This seems like a breaking change introduced in #89736.
@tannergooding I don't see any mitigations for the above change. There should have been a breaking change discussion, I wasn't involved so am unclear how to frame this to users.
@Gaoyifei1011 could you please see #91983 (comment). Specifically, I'm interested if you have set warnings to errors, and if so you should be able to get VS to generate a #pragma warning disable for you to ignore the warning. Or are you using an outdated version of roslyn / VS preview, which may be causing it to show as an error?
Activity
AaronRobinsonMSFT commentedon Sep 13, 2023
This seems like a breaking change introduced in #89736.
@tannergooding I don't see any mitigations for the above change. There should have been a breaking change discussion, I wasn't involved so am unclear how to frame this to users.
AaronRobinsonMSFT commentedon Sep 13, 2023
@Gaoyifei1011 The change to
inhere was a bit too aggressive. It should be eitherref readonlyor stay asref. I will put up a PR shortly.Gaoyifei1011 commentedon Sep 13, 2023
OK.Thanks for the quick fix
hamarb123 commentedon Sep 13, 2023
@Gaoyifei1011 could you please see #91983 (comment). Specifically, I'm interested if you have set warnings to errors, and if so you should be able to get VS to generate a
#pragma warning disablefor you to ignore the warning. Or are you using an outdated version of roslyn / VS preview, which may be causing it to show as an error?