Skip to content

Load correct PSRP library at runtime rather than compile time #436

Closed

Description

DllImport only allows for a compile time difference in the name of the library to import, but there may be other options. Ideally, we should be able to eliminate the remaining compile time code changes pretty easily, but this one is the hardest. https github.com dotnet corefx blob master src System.Runtime.Loader ref System.Runtime.Loader.cs#L31 https github.com dotnet corefx issues 3054 https github.com dotnet coreclr issues 930 https stackoverflow.com questions 11518577 dynamically and statically importing unmanaged c dlls into c sharp does not wo VSO create date - 1/7/2016 16:20:00

Activity

  1. andyleejordan commented on Feb 19, 2016

    @andyleejordan
    MemberAuthor

    This is no longer necessary. We were able to add a #if LINUX where LINUX is only defined when compiled with --configuration Linux, thus negating the need to do this at compile-time. Sure, the DLLs can't be shared across operating systems... but that is a non-issue as CLI allows us to publish them any time we want, for any supported framework and OS combination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions