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
UAP projects that reference vs-threading fail to compile with .NET Native #557
I'm drafting a change that adds a UAP10.0 target to the library that omits the problematic code. It also adds a UAP test project to the solution to verify that vs-threading never blocks UAP consumption again.
onovotny is there any way to add a uap10.0 TFM to my library for the sake of the nuget package target being offered and a C# preprocessor define WINDOWS_UWP, but without breaking dotnet build or requiring the UWP SDK to be installed? I don't really need anything from UWP's SDK -- I just need another TFM with the uap name in my package so I can provide a special build of the library for it.
Thanks for the tip. That sounds promising. So far though I can't find the right combination of properties to define to get restore and build working without warnings/errors. Any more tips?
Not only does that side-step any need for me to target UAP, but it (surprisingly) works on UAP (it doesn't even throw an exception). Thanks for the tip, Sam Harwell (@sharwell).
Activity
AArnott commentedon Nov 14, 2019
I'm drafting a change that adds a UAP10.0 target to the library that omits the problematic code. It also adds a UAP test project to the solution to verify that vs-threading never blocks UAP consumption again.
AArnott commentedon Nov 14, 2019
onovotny is there any way to add a
uap10.0TFM to my library for the sake of the nuget package target being offered and a C# preprocessor defineWINDOWS_UWP, but without breakingdotnet buildor requiring the UWP SDK to be installed? I don't really need anything from UWP's SDK -- I just need another TFM with the uap name in my package so I can provide a special build of the library for it.clairernovotny commentedon Nov 14, 2019
You might be able to do it without the extras by defining the TFM locally like this:
https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj#L44-L61
Instead of
native, you'd defineuap10.0and then potentially one of the netstandard TFM's/NuGet moniker's here: https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj#L46-L47AArnott commentedon Nov 14, 2019
Thanks for the tip. That sounds promising. So far though I can't find the right combination of properties to define to get restore and build working without warnings/errors. Any more tips?
Here's what I've tried.
sharwell commentedon Nov 15, 2019
What happens if you just use
Unsafe.AsPointerinstead?AArnott commentedon Nov 15, 2019
Not only does that side-step any need for me to target UAP, but it (surprisingly) works on UAP (it doesn't even throw an exception). Thanks for the tip, Sam Harwell (@sharwell).
Avoid C# syntax that's toxic to .NET Native compilers
sharwell commentedon Nov 15, 2019
Well alrighty then 😄