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
I have a number of classes that wrap Windows.Devices.Enumeration.Pnp.PnpObject to provide easy accessors for properties I expect to be included in the Properties member. In the transition from .net framework 4.6.1 to .net 5, I started hitting an access violation: #635
As a work around to that issue, I started making a managed copy of the properties as part of the constructor for my wrapper classes. This seemed to work fine until recently. I don't have multiple test environments to verify but it seems as though updating Windows has caused this because it repros with the old nuget version I was using 1.1.4, and the latest 1.2.6. What happens is that named Pnp properties like "System.Devices.ContainerId" sometimes return an object of the wrong type.
I have attached a simple repro that executes the same code in a .net framework project referencing the winmd and a .net 5 project using the latest CSWinRT nuget package to illustrate the difference.
I have a number of classes that wrap Windows.Devices.Enumeration.Pnp.PnpObject to provide easy accessors for properties I expect to be included in the Properties member. In the transition from .net framework 4.6.1 to .net 5, I started hitting an access violation: #635
As a work around to that issue, I started making a managed copy of the properties as part of the constructor for my wrapper classes. This seemed to work fine until recently. I don't have multiple test environments to verify but it seems as though updating Windows has caused this because it repros with the old nuget version I was using 1.1.4, and the latest 1.2.6. What happens is that named Pnp properties like "System.Devices.ContainerId" sometimes return an object of the wrong type.
I have attached a simple repro that executes the same code in a .net framework project referencing the winmd and a .net 5 project using the latest CSWinRT nuget package to illustrate the difference.
PNPBugRepro.zip
Edition Windows 10 Enterprise
Version 21H1
Installed on 5/15/2020
OS build 19043.985
Experience Windows Feature Experience Pack 120.2212.2020.0
The text was updated successfully, but these errors were encountered: