-
Notifications
You must be signed in to change notification settings - Fork 844
Pinvoke testing #6594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pinvoke testing #6594
Conversation
|
This sounds too simple? I've used p/invoke since dotnet core 1.0 without problems. I'm not aware of big changes there either for 3.0? |
I'm confused. So it's compatible with .NET Framework? |
|
@cartermp, @NinoFloris this is pinvoke from fsi, it worked fine for apps compiled with fsc. The RefEmit API for emitting the necessary code to support pinvoke wasn't added until netcoreapp3.0. The desktop fsi has always supported pinvoke from fsi. The coreclr version of fsi has not supported pinvoke until this PR: #6542 I hope this clears things up Kevin |
af0a023 to
9d1ddb7
Compare
02e3d19 to
9d1ddb7
Compare
|
@KevinRansom Did you intend to merge this? Build shows failure: https://dev.azure.com/dnceng/public/_build/results?buildId=165027 |
|
@cartermp bugger, it has some extra and buggy code in it. |
This reverts commit 028e1df.
Enable Pinvoke testing on coreclr.
Because pinvoke on coreclr is not supported on versions of dotnet framework lower than 3.0, we generate a flag at build time that determines whether to run the test or not.
Also adds a flag generated at build time, that lets us know whether we are running on coreclr version 3.0.
The tests run on desktop and coreclr, when applicable.
Some code was removed from the original test cases, this code was removed because it depends on a windows dll, cards.dll that is no longer shipped. And other code that relied on popdyn.dll, that I have no idea what it is or where it is. The existing test merely compiled against them. Now we also run the tests, so at last they are actually testing pinvoke.