-
-
Notifications
You must be signed in to change notification settings - Fork 224
Expose all APIs to netstandard builds #401
Conversation
Are those Win8 banned API's allowed for Windows 10? I recall Win10 allowing additional API's for store apps. Also, as Win8 requires VS 2015 and older SDK's to be present, is it "good enough" to target uap10.0 instead for this purpose? |
No. The public documentation simply lists each API as banned or not without regard to which OS version. I have confirmed this with MSFT internally -- when they update the app submission compliance system to add allowed APIs, it allows them for all Windows 8/10 versions.
No. There are Win8 apps that consume P/Invoke. |
You may want to use https://github.com/onovotny/SignService/blob/master/scripts/Install-WindowsSdkISO.ps1#L48 |
04ef123
to
3aa032a
Compare
We should take all trivia up to the nearest directive. As it was, we were taking all trivia except directives, which means we were dropping #if/#endif but picking up the content between them when it was 'inactive' making it also trivia, till we excluded the directives and then we activated the code accidentally. This was exposed when we updated to the latest codegeneration.roslyn package in order to fix some other directive handling.
I filed NuGet/Home#7277 to track the last remaining build issue. I have no workaround in mind yet. |
Workaround for dotnet/sdk#2517
I thought that a blank |
@onovotny Funny... I came to the same conclusion just in the last little while and filed novotnyllc/MSBuildSdkExtras#115 The |
This exposes all p/invoke APIs to all existing builds, including portable/netstandard.
It also adds an additional
win8
target which omits the store-banned APIs.In this way, someone targeting a combination of mono, .NET Framework, .NET Core, etc. can target portable/.netstandard and still get all the Windows APIs. By omitting the APIs from
win8
, when an actual app targeting the Microsoft Store is built, the banned APIs will be gone and not block store compliance checks. This could mean that if a library calls one of these banned methods, that the Store app will see a missing method exception at runtime.Fixes #382