Open AArnott opened 4 years ago
@clairernovotny you might know?
What API's are those? FWIW, I thought Windows Store was done banning APIs
You can't build UAP off of windows, AFAIK. NuGet also complains about duplicate monikers -- and doing two builds of .NET Standard, v2.0 will cause problems. Virtually everything ignores the TFM itself.
I have not heard that the Store isn't banning APIs any more. docs.microsoft.com still shows APIs as desktop only. Unless the Store were to somehow retroactively un-ban use of these APIs for all future submissions of apps even down to Win8, we need to need to exclude these p/invoke APIs from store apps.
You can't build UAP off of windows
I'm sure we can target the UAP TFM, given we don't actually need anything UAP specific and could totally spoof up all the .targets if we had to. I'm just looking for something much easier if it exists.
@AArnott don't know if this link is still the best approach, but I found this github comment that links to a sdk-style .csproj configured to build UWP https://github.com/dotnet/sdk/issues/1408#issuecomment-330063812
Thanks for the tip, @jalbertSyncroTech. That looks promising and I'll give it a try.
I have a class library that contains p/invokes to Windows Store-banned APIs. Today this project multi-targets netstandard2.0 and uap10.0 in order to conditionally exclude these banned p/invokes when compiling for store apps. But this prevents me from building my project off Windows.
So I dropped using the MSBuild.Sdk.Extras and tried my own homemade version:
The idea being to just treat it like an ordinary project targeting netstandard2.0, except give it a uap10.0 TargetFramework name so that when packing it goes to a
lib\uap10.0
folder.But when doing this,
dotnet build
fails with this: