OneGet / NuGetProvider

NuGet Provider for OneGet. Works on Nano Server.
MIT License
31 stars 24 forks source link

Target netstandard2.0 instead of netstandard1.6 and netcoreapp2.0 and modernize build #48

Closed bergmeister closed 5 years ago

bergmeister commented 5 years ago

Related: https://github.com/OneGet/oneget/pull/411 This is a pre-requisite to make a similar change in Packagemanagement. I am aware you still have to speak to people to confirm, please take your time until you are ready for review, I on the other hand I am confident enough to already submit a PR for this. I also improved the build system by using the latest appveyor build image instead of the old legacy wmf5.0 one, which does not work for standard accounts out of the box. This image also provides things such as nuget.exe out of the box. The PowerShell reference assemblies were fixed as well for net451 to use the Windows PowerShell references for 3, 4 and 5, for PowerShell Core, PowerShell Standard 5.1 was used to cover all PowerShell Core versions and implicitly Windows PowerShell 5.1 as well (because I cannot reference the 5.1 reference assemblies since the minimum requirement is net461) NB: I also tried to upgrade the NuGetLightProvider project to the new 2017-csproj format but the conversion did not work out of the box, therefore I did not touch it but this is definitely a point to be improved upon in the future. I also have to say that this repo should rather be integrate into OneGet\oneget because only the project in the vs-csproj gets built as part of this repo, hence why I added at least a call to it. Is there a reason why this repo is being consumed as a submodule (i.e. are there more consumers?) P.S. The new appveyor image will also give you the ability to later improve the build to use a build matrix to also run CI on PowerShell Core on Windows/Linux later on.

cc @edyoung @alerickson

bergmeister commented 5 years ago

@edyoung @alerickson Any updates? As we discussed elsewhere the NanoServer image provided by the powershell team (microsoft/powershell:nanoserver) is .Net Standard 2.0 compatible and the microsoft/nanoserver image has an old, pinned version of packagemangement, therefore updating to .Net Standard 2.0 is no problem.

docker run microsoft/nanoserver powershell -c (Get-Module packagemanagement -ListAvailable).Version.ToString()
1.0.0.1
alerickson commented 5 years ago

@bergmeister Thanks for you patience with this one!

bergmeister commented 5 years ago

You're welcome. The hard work will be using it in OneGet at runtime. I already have a branch for that but it is not working end to end yet at runtime when using the netstandard binaries, I could open a 'work in progress' PR for that but before we definitely need to merge PR 416 to have a better base for it