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
When using the .24 version of the Windows SDK projection with a CsWinRT projection built using CsWinRT 1.3.0 or earlier, you may run into Unable to cast object of type 'WinRT.ObjectReferenceValue' to type 'WinRT.IObjectReference' when using events from those projections. This is due to a compat regression in the latest WinRT.Runtime from the generic marshaler updates. This issue doesn't affect CsWinRT projections generated using >= 1.3.1.
Workarounds until a fix is available:
If the events being used are from Win2D, update to the latest Win2D update (1.0.1) which has an updated CsWinRT projection which doesn't hit the issue.
If it is in your own projection, the recommendation is to move to a newer version of CsWinRT (anything after 1.3.1, preferably latest or 1.5.0) to build your projection.
Use the WindowsSdkPackageVersion property to pick up the .25 version of the Windows SDK projection which has the fix for this issue. i.e if you are targeting the 19041 Windows API version in your TFM, you can set the property <WindowsSdkPackageVersion>10.0.19041.25</WindowsSdkPackageVersion> to pick up the .25 version. This is only needed until the next .NET SDK update which should have this version with the fix.
If you are running into this same issue outside of events, that would be a different issue from this, and a new bug should be opened to track and investigate that.
The text was updated successfully, but these errors were encountered:
When using the .24 version of the Windows SDK projection with a CsWinRT projection built using CsWinRT 1.3.0 or earlier, you may run into Unable to cast object of type 'WinRT.ObjectReferenceValue' to type 'WinRT.IObjectReference' when using events from those projections. This is due to a compat regression in the latest WinRT.Runtime from the generic marshaler updates. This issue doesn't affect CsWinRT projections generated using >= 1.3.1.
Workarounds until a fix is available:
WindowsSdkPackageVersion
property to pick up the.25
version of the Windows SDK projection which has the fix for this issue. i.e if you are targeting the19041
Windows API version in your TFM, you can set the property<WindowsSdkPackageVersion>10.0.19041.25</WindowsSdkPackageVersion>
to pick up the .25 version. This is only needed until the next .NET SDK update which should have this version with the fix.If you are running into this same issue outside of events, that would be a different issue from this, and a new bug should be opened to track and investigate that.
The text was updated successfully, but these errors were encountered: