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

Add .Net Standard 2.0 support to OR-Tools #668

Merged
merged 46 commits into from
Jun 30, 2018
Merged

Conversation

acco32
Copy link
Contributor

@acco32 acco32 commented Apr 25, 2018

@Mizux @lperron

Able to build OrTools using .NET Standard 2.0. This makes it runnable in all frameworks (core 2.0, netfx 4.6.1) Includes C# & F# library. Still a work in progress but created PR to get some feedback.

make dotnet will create the library and make test_dotnet will create and run the converted tests. Not all of them were converted.

@Mizux Mizux self-requested a review April 25, 2018 09:50
@Mizux Mizux self-assigned this Apr 25, 2018
@Mizux Mizux added Feature Request Missing Feature/Wrapper Lang: .NET .Net wrapper issue labels Apr 25, 2018
@Mizux Mizux added this to the v6.8 milestone Apr 25, 2018
DOTNET_EXECUTABLE := $(shell $(WHICH) dotnet.exe 2>nul)
else # UNIX
ifeq ($(PLATFORM),MACOSX)
DOTNET_EXECUTABLE := $(shell dirname ${DOTNET_INSTALL_PATH})$Sdotnet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this, once you have done your brew cask install dotnet-sdk, just restart your terminal and you'll have:
$ which dotnet
/usr/local/share/dotnet/dotnet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restart terminal from CI?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rehash or hash -r (osx) should do the job

ifeq ($(PLATFORM),MACOSX)
DOTNET_EXECUTABLE := $(shell dirname ${DOTNET_INSTALL_PATH})$Sdotnet
else # LINUX
DOTNET_EXECUTABLE := $(shell which dotnet)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(WHICH)


.PHONY: dotnet # Build OrTools for .NET
dotnet: \
clean_dotnet \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure clean_dotnet is needed

make dotnet will always rebuild while other e.g. make cc will print target 'cc' up to date nothing to do


.PHONY: detect_dotnet # Show variables used to build dotnet OR-Tools.
detect_dotnet:
ifeq ($(SYSTEM),win)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if same commands on both branches

HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AFA3F878-FB56-4314-B31E-3DA5583B548B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this magic "hash" ?

Is it univeral or dependent of your system (i.e. kind of watermarking)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hash is the project identifier. So long as projects are added using the toolchain, this shouldn't be a problem.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok found ! https://msdn.microsoft.com/en-us/library/bb165951.aspx
BTW Thanks for the explanation

@Mizux
Copy link
Collaborator

Mizux commented Apr 25, 2018

So basically we remove the csharp/fsharp compiler to use dotnet sdk if I understand well.

I'm not against this change/move but I think I would wait a little before merging it since it will need to update the "install from source" to be sync (e.g. remove all make csharp/fsharp and replace them by make dotnet).

And I would like to play with it a little to see how does it works (and give usage feedback) before approval/merge. BTW good job !

Thanks again !

@Mizux Mizux modified the milestones: v6.8, v6.9 Apr 25, 2018
@@ -145,6 +145,11 @@ $(GEN_DIR)/com/google/ortools/sat/CpModel.g.cs: $(SRC_DIR)/ortools/sat/cp_model.
$(GEN_DIR)/com/google/ortools/sat/SatParameters.g.cs: $(SRC_DIR)/ortools/sat/sat_parameters.proto
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Ssat --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sortools$Ssat$Ssat_parameters.proto

$(CLR_KEYFILE):
ifdef CLR_KEYFILE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swap both lines ?
if CLR_KEYFILE is not def is not necessary to create the rule : i.e. empty ?

@acco32
Copy link
Contributor Author

acco32 commented May 4, 2018

@Mizux is there another fix in master branch to fix appveyor builds.

@Mizux
Copy link
Collaborator

Mizux commented May 4, 2018

Hi,

didn't know master was broken, on my way to fix it.
Seems to be related to the new prefix variable I have added for make install
EDIT: fixed by 3605506

Sorry for the inconvenience, shame on me !

@Mizux
Copy link
Collaborator

Mizux commented May 4, 2018

There is also an other error, the recent commit df333ef has reverted my patches i.e. protoc must use $(PROTOBUF_PROTOC_INC) instead of $(PROTOBUF_INC)

EDIT: fixed by b44277a
appveyor: https://ci.appveyor.com/project/lperron/or-tools-98u1n/build/job/61gy7v18ovjce7qc

@acco32
Copy link
Contributor Author

acco32 commented May 6, 2018

@Mizux for the windows build does the lib folder also have to be referenced when running the application (i.e.: PATH=/lib;%PATH% mono example.exe). Otherwise it seems the dotnet DLL has trouble finding the shared native library that contains the routines. Please have a look at appveyor builds.

@Mizux
Copy link
Collaborator

Mizux commented May 7, 2018

@acco32

  1. on windows mono should be replaced by dotnet run cli right ? (just confused by your "i.e. ... example.exe")
    -> Should we also use dotnet run on UNIX i.e. remove mono dependencies ?
    (not sure exactly if mono is(will be) still required with .Net Core 2.0 and dotnet project)
    EDIT: mono seems still be heavily use on UNIX world, so at least we should keep some tests using mono runtime. (or running them with dotnet run AND mono)

  2. on windows we should not have a lib directory and put all .dll in bin directly IMHO since the search for dynamic library is basically the current binary directory (i.e. no /usr/lib à la GNU/Linux once installed)

Dynamic linking Windows Search Order:

  1. ...the application's package manifest (ed: we won't rely on this since we do cross platform built with minimal project/manifest stuff IMHO)
    2.The directory the calling process was loaded from. (ed: bin dir for us)
  2. The system directory (%SystemRoot%\system32). (ed: too much intrusive, need admin access and install step to copy file there)

src: https://msdn.microsoft.com/en-us/library/ms682586%28VS.85%29.aspx?f=255&MSPPError=-2147217396
So only 2. aka everything in the same dir is our only way to do it without headache and without touching env variables IMHO

  1. For nuget packaging I don't know where usually dll are placed inside the artifact.

  2. Will appveyor be fixed if ortool.dll is placed in bin ? I means first let have a windows style layout (i.e. everything in bin) (note: on windows only !, UNIX let's follow the FHS) then fix/adapt test and CI

@mwpowellhtx
Copy link
Contributor

I'm looking forward to this. Sorting out some of my bits re: .NET Standard migration as well. Will like to consider migrating my Solver adapters, as well as pick up a couple of the improved Solvers. 👍

@mwpowellhtx
Copy link
Contributor

👍 This is awesome work. I look forward to giving it a look. Thanks!

To be clear, one doesn't "target" .NET Standard, per se. From what I understand, Standard is to Core what PCL was to portable run times from prior years. Test assemblies, applications, etc, then target 4.6.1, Core, or other actual run time, and so on. However, if I understand it correctly, virtually every other constituent assembly up until the point of commitment could potentially target .NET Standard.

I found this out somewhat to my chagrin porting one of my other suites to the .NET Standard paradigm.

@Mizux
Copy link
Collaborator

Mizux commented May 16, 2018

My understanding is in theory:
.NetStandard2.0 is an API spec.
While .NetCore2.0, .NetFramework4.6.1 and Mono5.4? are .NET implementation of these spec i.e. any .cs files containing only call(s) to these APIs must compile using one of this implementation since they implement the standard.

Now on Nuget side taking a famous package https://www.nuget.org/packages/NUnit/ ,it says

Supported platforms:

  • .NET Framework 2.0+
  • .NET Standard 1.6+
  • .NET Core

What's puzzle me (I'm start to getting lost) is why it is listing .Net Standard 1.6+ here, actually it seems that .NetStandard is also a target platform.

So inside the nunit.3.10.1.nupkg/lib you have:

  • net20
  • net35
  • net40
  • net45
  • netstandard1.6
  • netstandard2.0
    note: netXX stand for .NetFrameworkXX
    note2: looking at different packages I never saw "core2.0" directory but since .NetStandard and .NetCore are tightly linked...
    open question: if you have net20 do you really need net35... ? (I think .NetFramework is backward-compatible.)

My understanding concerning runtime is dotnet and mono are runtime execution env.

  • dotnet is cross platform but still not widely use on UNIX and rely on nuget netstandardXX dir
  • mono is still heavily use on UNIX world (e.g. by Xamarin on MacOS) and rely on nuget netXX dir, i.e. compatible/emulate the .Net Framework...

My long term objective is to have net45 (or net46?) + netstandard2.0 dir in ortools nuget package.
And I think this is what @acco32 is targeting ?

ToDo: (in an other repo? or in a test/project directory)

  • provide one dotnet example project [using|depending on] the netstandardXX ortools nuget package dir.
  • provide one mono example [using|depending on] the netXX ortools nuget package dir.
  • Integrate them in the CI job to guaranty the nuget package integrity...

@Mizux Mizux changed the title dotnet standard Add .Net Standard 2.0 support to OR-Tools May 16, 2018
@mwpowellhtx
Copy link
Contributor

@Mizux That's along the same lines as my loose understanding. The trouble is, if it is an "API definition" or "API surface area", whatever you call it, then why offer it as target of any assembly project at all? That was, still somewhat is, part of my confusion. "It works", but I would still like to understand it a little better. It is closer to, say, compiled byte code in Java, ubiquitous, regardless of the JVM, or the PCL, "portable" class library. Actually PCL is in the history, maturity of how we've gotten here, apparently.

@Mizux
Copy link
Collaborator

Mizux commented May 17, 2018

As I said (cf link above) .Net Standard is both a "API surface area" and a "target platform" (kind of generic/universal/ubiquitous byte code that other .net implementation can consume if their are compatible with this standard).

This also explain why people ship net45 and netstandard1.6 in the nuget package since .Net Framework 4.5.1 only support NetStandard up to 1.2 cf https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support.

@ALL Do you think also providing netstandard1.6 could be a good idea ? I mean there is a gap between net45 and netstandard2.0 but not sure it will worth the pain...

note: providing a nuget with a net45 means mono 5.4 >= is only mandatory when building from source not for consuming the artifact...
many distro are still using mono 4.6/4.8 cf
Packaging status

@mwpowellhtx
Copy link
Contributor

@Mizux The difference between .NET Standard and the target frameworks is not my understanding. Standard is closer to PCL than it is the run-time is my understanding. Folks ship both either because they are as royally confused about it as I am, or be cause truly their assemblies may make sense for maximum portability, and/or they also think their assemblies could stand alone, as a truly target run-time environment. One case in point is testability; test assemblies must target a run-time; NOT the Standard. I just got done with a round of these shenanigans, so I'm pretty well acquainted with the difference by now.

@mwpowellhtx
Copy link
Contributor

mwpowellhtx commented May 17, 2018

@Mizux To answer your broader question, don't confuse net45 with netstandard2.0. They are two different animals. Not sure, but probably netstandard1.x is geared towards net45x run times. Whereas, as far as I know, netstandard2.0 is geared towards net462 run times. I don't pretend to know why, other than, "it is what it is".

Now, what that means for OR Tools... Depending what sort of features you want to leverage, could you target both? That would reach the broadest possible audience. That is, both netstandard1.x and netstandard2.x.

As for earlier mentions of fails during test assemblies? Make sure you are targeting the run times, not the API targets. That is, 4.5.2 and/or 4.6.2. That should work for you.

@Mizux Mizux mentioned this pull request May 25, 2018
@Mizux Mizux modified the milestones: v6.9, v6.8 May 25, 2018
@acco32 acco32 deleted the dotnet branch July 4, 2018 05:25
@mwpowellhtx
Copy link
Contributor

@acco32 @Mizux What's the sitrep here? Any progress? Looking forward to seeing that NuGet package published. Thanks!

@Mizux
Copy link
Collaborator

Mizux commented Jul 16, 2018

Hi all,

@acco32 @mwpowellhtx I continued some refactoring on dotnet which currently live on master...
I also take few bits of #744 (Nugget package) but still didn't test it.
Hope to do nuget test this week (second half).

52c126c
move some targets to try to follow other makefile.mk i.e. main target at top etc...
better to me when jumping from one file (i.e. language) to another...

496be16
rework input files i.e. move *proj file to proj.in file to void in place sed which bother me each time I rebase my working branch
note: start to use @VAR@ instead of VVVV since cmake configure_file() use this style to replace -> be able to easily reuse .in file when doing the cmake port (and vcpkg? 😄)

6cd212b
rework CLR_KEYFILE management to use a dotnet project to create the .snk -> remove the last dependencies on Mono (which provide sn on unix world)
note: have to use netcoreapp2.1 otherwise current working dir is badly resolved on few distro (see below)

13b8633
netcoreapp 2.0 -> 2.1 have some issue with CurrentWorkingDir() on few platforms could be only related to dotnet-sdk < 2.1.302 and not netcoreapp2.0 -> 2.1
note: 2.1.300 integrate netcoreapp2.1

d0c2e17
add --verbosity n[ormal] when running test

0f2980d
DLL -> D (want to reuse DLL like EXE/JAR for other languages to list all examples)

Currently I'm verifying our docker distro can build master and create our usual working archives, once done, I'll test the Nuget generation...

@mwpowellhtx
Copy link
Contributor

@Mizux I'm really interested to take a look at at least a solid prerelease RC package right now. If confidence is high this is on a winning track, then perhaps examples could be packaged separately from now on, i.e. google.ortools.examples.$(semver).nupkg, and subsequently delivered, with appropriate dependencies on the google.ortools.$(semver).nupkg. Thanks!

@mwpowellhtx
Copy link
Contributor

Issue filed along these lines. If it can be easily addressed, awesome! Without distracting from the overall goal of this endeavor, that is.

@paultrow
Copy link
Contributor

The installations for OR-Tools with .Net currently say the following:

"Prerequisite: .NET Core 2.1 SDK
Then you must also install the package .NET Core 2.1 SDK version 2.1.302 or higher:

Simply install this https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.302-windows-x64-installer"

Does support for .NET Standard 2.0 mean that users could install .NET Standard instead of .NET Core? Would this be of interest to the ordinary OR-Tools user, who is not building applications?

Thanks.

@mwpowellhtx
Copy link
Contributor

mwpowellhtx commented Jul 30, 2018

@paultrow I do not know about OR Tools docs, but to be clear, as I understand it and has been explained to me, Standard is not Core, and Core is not Standard. Standard is an "API surface area" so to speak, whereas Core is a run-time. Standard dependencies are closer to PCL from previous years, and can be consumed by, i.e. are dependencies for, Core projects, .NET Framework 4.6, 4.7, depending on the Standard version, and so on. I don't know if this answers your question, but it's not as simple as "depending on Core".

Extending the thought, however, in my mind, I would expect OR Tools itself to "target" (though, not in the traditional run-time sense) Standard, and not Core. Save the run-time targeting for the very last moment when the Tools package is consumed by the end product.

@mwpowellhtx
Copy link
Contributor

mwpowellhtx commented Jul 30, 2018

@lperron What's the situation re: this effort? Where does the test code, samples, etc, stand? Let's separate those packages so we can see some measurable progress publishing at least an RC package for the OR Tools themselves, shall we? Thanks!

@paultrow
Copy link
Contributor

@mwpowellhtx My main question is who among OR-Tools users is support for .NET Standard relevant to? I'm guessing that for the vast majority of users, it isn't important.

@mwpowellhtx
Copy link
Contributor

@paultrow This conversation was had a couple of months ago, and the decision was to go with Standard. Did something change with respect to Standard, Core, etc, landscape in the meantime?

Excuse me, sir, with all due respect, you're talking to one right now. For anyone else following the trajectory of the ASP.NET Core, .NET Standard, .NET Core landscape, it should matter, also.

@paultrow
Copy link
Contributor

I apologize if I offended you. I'm simply gathering information for the OR-Tools Release Notes and installation instructions. I'll look elsewhere.

@mwpowellhtx
Copy link
Contributor

@paultrow I don't know what your background is, your Github profile seems rather barren at the moment, for instance. Core/Standard is/was/continues to be confusing even for the "washed" so to speak, so the confusion is understandable.

Personally, I've made an effort to get informed about it; for instance, .NET Foundation holds a weekly (for the most part) YouTube/Hangouts stand up that covers the latest goings on concerning ASP.NET Code, Standard, and Core timelines, etc. Gitter is also an interesting source to learn about discussions of this nature.

I'm not sure what is meant by "ordinary OR Tools users" or "who is not building applications"? In what sense of the word "applications"? Desktop, web-based, component assemblies? At least from a .NET perspective, OR Tools is not an application unto itself, at least not as far as I am concerned.

@lperron
Copy link
Collaborator

lperron commented Jul 30, 2018 via email

@jonwagner
Copy link

".NET Standard 2.0" is basically a standard set of library APIs that you code to. If or-tools targets .NET Standard, then you can run it on any platform that supports the standard.

".NET Core 2.0" is a similar API, but is intended for end applications. That should be out of the discussion here.

If you want to keep "legacy" code alive, you will also likely want to ship a NET45 or NET46 target. There are plenty of shops that are stuck on NET4x and won't be updating in the near future.

Personally, I try to target all new .NET code to the standard, so you have the option of running portably (e.g. I'm trying to run on OSX and Win for this project).

TL;DR - target netstandard20 and (net45 or net46)

I'd be happy to help out with this bit if you need some additional resources.

@lperron
Copy link
Collaborator

lperron commented Jul 30, 2018 via email

@jonwagner
Copy link

You can use the same tools to build any of those targets, but if you want to compile a net45 target, I think you have to do the build on a windows machine. Since you're producing a nuget package already, your build system should support it.

I'm new to your code. I'll take a deeper look at it tonight (TZ = America/New_York)

@mwpowellhtx
Copy link
Contributor

mwpowellhtx commented Jul 30, 2018

@lperron @jonwagner I just want to be clear on the language here. Understandably, OR Tools does not exclusively serve the .NET community, nor even necessarily Windows only, nor should it. That's where folks like myself and @jonwagner enter in.

Note, see also Target frameworks.

Yes, netstandard is the "API surface area", akin to PCL, which is what you want, I should think. netcore is a run time, in theory extending across platforms. However, pretty sure both "targets" extend across platforms. Depending on the netstandard version, also supports net46 and net47 depending on whether you target netstandard1.x or netstandard2.x, but I could be wrong there, net45 may work here as well, I don't know.

Similarly with @jonwagner, I've accepted that netstandard is the appropriate target for many of my sort of basic, building block assemblies. Core may be A runtime, does not need to be THE target that I adopt; I may want to target net47, depending on the requirement, for instance. The point is, when I consume a netstandard package, then I am assuming PCL-like flexibility until the very last moment when I need to target a run-time.

Tracking this, or other issues, however, I've had the impression that the samples, etc, as been the bottle neck to packaging anything, never mind an RC. The sooner packaging can happen the sooner I can start updating my own wrappers when the dependencies are known. So anything we can do to clear the path for the "core" OR Tools assembly, if you will, I'm interested to see happen. This is my interest in it as you know.

Others have been forging this path for now, so I am reporting as an interested bystander, but I can provide feedback, contribute further, etc, provided bandwidth is available.

@lperron
Copy link
Collaborator

lperron commented Jul 30, 2018 via email

@lperron
Copy link
Collaborator

lperron commented Jul 30, 2018 via email

@mwpowellhtx
Copy link
Contributor

@lperron Thanks for clarifying by the way; I was concerned we might be talking about targets themselves, but I probably read that incorrectly. We're on the same page; if you can target one, or a couple at most, instead of half a dozen, absolutely.

So you think that on windows we should also target 4.x? Would 4.5 be the right target?

Assuming any sort of backwards compatibility is required, then it sounds like the right thing to do. I'd be content to leave it there as a dormant issue, and if anyone still needed it to up vote it, or give it a thumbs up, or something along these lines.

For my concerns, I am more interested in tracking with the netstandard path these days, however. Maybe there is a corner case where I still need the net45 support, but I cannot think of one off the cuff.

@jonwagner
Copy link

I was only suggesting a .NET Framework target to not break existing users.

The last version only targets Google.OrTools 6.7.4973' was restored using '.NETFramework,Version=v4.6.1', so keeping 4.6.1 support should keep people happy.

If you build for netstandard20, it may work on 461, but may not (see dotnet/standard#64 for some notes)

Definitely build for netstandard2.0. It will get you everything going forward.

If your build process already runs on a Windows box, you might be able to target both for (almost) free just by specifying both targets in the .csproj file. (example: https://github.com/jonwagner/Insight.Database/blob/master/Insight.Database.Core/Insight.Database.Core.csproj)

IMO: if you get it for free, keep net461 and netstandard20. If you have to choose, go netstandard20.

I'll check out the code later...

@mwpowellhtx
Copy link
Contributor

@lperron @jonwagner Good points.

My understanding is that netstandard1.x targets are net46x compatible, whereas netstandard2.x is net47x compatible moving forward.

Personally, I'm less interested in anything but netstandard2.x at this point, but like I said, leaving it open for others to up vote, etc, may be a good thing.

Anywho... Thanks, all!

@mwpowellhtx
Copy link
Contributor

@paultrow @lperron @jonwagner One thing to also keep in mind also is whether you want to be on LTS. I'm not positive if that has to do with the SDK, per se; I'm a bit fuzzy on those details. As contrasted with a daily or nightly Core/SDK builds, let's say.

@lperron
Copy link
Collaborator

lperron commented Jul 30, 2018 via email

@jonwagner
Copy link

@mwpowellhtx is right. If you can target netstandard1.6, you'll support net461 and everything after that for free.

It looks like the build system is pretty clean and simple now, so it would be ideal if you can get the library to compile against netstandard1.6. You can test it by just switching the targetframework and doing a build. If 1.6 has all of the methods that you need, then you're done. If the build fails, then there's probably nothing you can do.

I'll see if I can get it to build on my mac tomorrow. If you have any pointers/docs to how the dotnet build runs, please point me to them.

@lperron
Copy link
Collaborator

lperron commented Jul 31, 2018 via email

@mwpowellhtx
Copy link
Contributor

@lperron I couldn't advise you as to the Linux dependencies, but as far as the netstandard1.6 (or greater), that likely may extend across platforms. So, if I understand @jonwagner 's point, as long as the API surface area provides sufficient coverage, it should be fine for that or better netstandard versions across platforms. Test all this, of course, but this is my loose understanding. Notwithstanding Mono dependencies. Personally, I'm fine just saying netstandard2.0 or better, but I'm mainly focused in the Windows area at the moment; but the API coverage makes sense to me.

@jonwagner
Copy link

I spent some time trying to get or-tools to compile against netstandard1.6. SWIG uses some classes that aren't available, and it would be non-trivial to change it. So my recommendation is to target netstandard2.0 like you currently are.

I'll be building that and I can give you feedback on how the packaging looks.

@lperron
Copy link
Collaborator

lperron commented Aug 1, 2018 via email

@Mizux
Copy link
Collaborator

Mizux commented Aug 6, 2018

To summary:

  • OrTools target netstandard2.0 as a library to only depends on Microsoft SDK (@paultrow the SDK contains the netstandard2.0 libraries and netcore2 runtime) and remove deps to mono on unix (i.e. "loosing" netfx framework in favor of Microsoft backed netstandard), while

  • examples target netcoreapp2.0 as runnable TFM (Target Framework Moniker) "last end product" (also available in the SDK).

  • to get rid of mono we generate the ortools.snk key file using a dotnet application cf tools/dotnet/CreateSigningKey unfortunatelly all sdk were broken on unix to correctly deal with relative path and GetCurrentDirectory() stuff so we have to target netcoreapp2.1 which is available/provided by .Net Core SDK >= 2.1.302 (note: this only concern CreateSigningKey, examples can target netcoreapp2.0 since they are not using this API)

  • All previous examples have been kept in examples/dotnet/netfx and are not built since they depends on netfx which is not available on unix unless using mono -> need to make my mind about them...
    EDIT: I think i'll move them to use the netcoreapp2.0 so we can build/run them on all architecture (i.e. without the need of mono on unix OS Platform)

  • I'll try to move all examples to netcoreapp2.0 and PackageReference Google.OrTools (i.e. netstandard2.0).

  • Currently nuget package generation is broken please see Create nuget package (without native libs) #744 to follow.
    As @lperron said first we'll try to provide a window only native package then try to provide a cross platform one next.

ps: in vacation last week sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Missing Feature/Wrapper Lang: .NET .Net wrapper issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants