Skip to main content

Gurobi 11.0 nuget package and netstandard 2.0

Answered

Comments

2 comments

  • Elisabeth Rodríguez Heck
    • Gurobi Staff Gurobi Staff

    This was handled in a ticket.

    0
  • Christoph Hofer-Temmel
    • Gurobi-versary
    • First Comment
    • First Question

    Just to make some of the non-private ticket information public:

    1) Adding the missing information to the nuget package (i.e., for `netstandard`) solves this problem only with the first project. Projects 2 to n do not get a copy of the Gurobi libraries. This seems to be an old MSBuild based build-chain limitation. See https://stackoverflow.com/questions/856278/why-the-native-dll-is-not-copied-to-the-output-directory.
         1a) You can work around this by a direct reference to the Gurobi nuget package.
         1a) Or do a custom post-build action.
         1c) You can add a <RuntimeIdentifiers>...</RuntimeIdentifiers> in each downstream project.
                  * This builds with a single RID.
                  * With multiple RIDs this needs a build flag to choose a RID.
                  * This looses "full" netstandard, but works as the interactive use case has an intelligent user in front of the screen ... and we know where we currently run.
         1d) You can switch to exe instead of Library for your project type. Loosing netstandard.

     

    0

Please sign in to leave a comment.