dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 222 forks source link

Should 'api-ms-win-core-file-l1-2-0.dll' be 'api-ms-win-core-file-l1-1-0.dll' instead? #574

Closed yyjdelete closed 3 years ago

yyjdelete commented 3 years ago

When try to use https://github.com/dotnet/Nerdbank.GitVersioning/ on win7 with netcore, I see an System.EntryPointNotFoundException: Unable to find an entry point named 'CreateFile' in DLL 'api-ms-win-core-file-l1-2-0.dll'. from PInvoke.Kernel32, even there is already an 'api-ms-win-core-file-l1-2-0.dll' from netcore. (Seems the netframework version use kernel32.dll instead and doesn't have the problem.

Should 'api-ms-win-core-file-l1-2-0.dll' be 'api-ms-win-core-file-l1-1-0.dll' instead, since all current usage(CreateFile, FindFirstFile, FindNextFile) are already available in 'api-ms-win-core-file-l1-1-0.dll'.

Or it's just by design since win7 is already EOL?

AArnott commented 3 years ago

We should be using the oldest name that defines a given method. If we messed up here, please feel free to send a PR to fix that.

AArnott commented 3 years ago

Per discussion on PR, unless we have API documentation to back up this change, we won't take it.