Skip to content
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

Adds .NET Core support #12

Merged
merged 3 commits into from
Nov 24, 2019
Merged

Adds .NET Core support #12

merged 3 commits into from
Nov 24, 2019

Conversation

3F
Copy link
Owner

@3F 3F commented Nov 10, 2019

Adds .NET Core support.

The main problem is that an unmanaged EmitCalli is available only with netcoreapp2.1+ https://github.com/dotnet/corefx/issues/9800

Looks like we can't just provide netstandard2.0 target. Only SDK 3 (netstandard2.1) and of course netcoreapp2.1. See #13


Closes #13

@3F
Copy link
Owner Author

3F commented Nov 24, 2019

I'm watching 1 failed test for CI while my laptop heartily don't want to disturb me :)

x64 + enabled multithreading tests in Xunit (Run Tests In Parallel)

https://ci.appveyor.com/project/3Fs/conari-wkygr/builds/29084219

  X ConariTest.BindingTest.basicTest12 [33ms]
  Error Message:
   Assert.Equal() Failure
Expected: 7
Actual:   -1

Well, looks like we have the problem with an mentioned multithreading support and looks like I've found this problem place. This is other core issue which does not related to this PR. I'll try to fix it later.

.net core support is ready to merge.

@3F 3F changed the title WIP. Adds .NET Core support Adds .NET Core support Nov 24, 2019
@3F 3F merged commit 09214b3 into master Nov 24, 2019
@3F 3F deleted the dev/netcore branch November 24, 2019 22:34
3F added a commit that referenced this pull request Nov 30, 2019
* NEW: Starting support of the .NET Core. PR #12
       Full support: netcoreapp2.1 and netstandard2.1 (SDK 3).

* NEW: Hack of the unmanaged EmitCalli to support .NET Standard 2.0. Issue #13.

* NEW: NativeData and BReader now supports CharPtr, WCharPtr, BSTR types.

* NEW: Implemented isolation for PE Modules. Issue #15.
       Manage it through `IConfig.IsolateLoadingOfModule`.

       Optionaly it will isolate module for a real new loading even if it was already loaded somewhere else. Full details in #15

* NEW: Added `ConariX` as an compatible DLR version of ConariL implementation:
        ```
        using(dynamic l = new ConariX("..."))
        {
            // just everything is yours ~
            l.curl_easy_setopt(curl, 10002, "http://example.com");
        }
        ```

* NEW: Implemented kernel32 WinApi via new ConariX:
        ```
        dynamic kernel32 = new Kernel32();

            kernel32.GetModuleHandleA<IntPtr>("libcurl-x64");
            kernel32.GetModuleHandleW<IntPtr>((WCharPtr)ustr);
        ```

* NEW: Implemented user32 WinApi via new ConariX:
        ```
        dynamic user32 = new User32();

            user32.ShowWindow(0x000A0A28, 3);
            user32.MessageBoxA(0, "Conari in action", "Hello!", 0);
        ```

* NEW: Added netfx based target platforms: net472.

* NEW: Added initialization of UnmanagedString from IntPtr.

* FIXED: Fixed bug with typeof(void) for return type when DLR.

* FIXED: Fixed bug with x64 for CharPtr, WCharPtr, BSTR types.

* CHANGED: Performance: Internal ModuleBuilder now is unified for all our new generated dynamic types.

* CHANGED: Added hMSBuild 2.2 + GetNuTool 1.7 in nupkg packages for related build processes:

       https://www.nuget.org/packages/Conari/
       * tools\gnt.bat - https://github.com/3F/GetNuTool
       * tools\hMSBuild.bat - https://github.com/3F/hMSBuild

* NOTE: Official Releases:

        * NuGet: https://www.nuget.org/packages/Conari/
        * GitHub: https://github.com/3F/Conari/releases/latest

* NOTE: Please note again, .NET Standard 2.0 support is possible only because of our hack!

        While other netcoreapp2.1 + netstandard2.1 target platforms will not contain this modifications at all. Means most known behavior.

        Do not hesitate to contact: https://github.com/3F/Conari/issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unmanaged EmitCalli and netstandard2.0
1 participant