Update build system
Closed this issue · 2 comments
The current build system has a number of issues:
- It uses the old approach of having one project per target
- The NetStandard project uses project.json, which requires the preview tooling for .NET Core
This was somewhat workable while I had VS2015 and the preview tooling installed, but now I only have VS2017.3 so an update has become necessary to release new versions.
Ideally:
- The build will have a single library project that has
TargetPlatforms
set for all the current TFMs. I'm not sure if PCLs are supported, so this may have to end up as two. - If the build becomes a single project, it should generate a nupkg using the new csproj-based system.
- It should ideally build on .NET Core (inc. Linux/macOS), automatically dropping the Windows-only TFMs
Turns out this will have to wait until after we drop net40 support - the System.Net.HttpExtensions.dll that ships with net40 in Microsoft.Net.Http (the old package that supported net40) references a different version of System.Net.Http and it causes a number of build errors.
I had worked around the issue by overriding the reference to point to the net45 version of System.Net.HttpExtensions, which apparently works but doesn't appear to be possible in in the MSBuild15 project system.
It might be possible to work around all of this, but I don't want to risk breaking backward compatibility in a point release so it will need to wait until the next major release.
Hi, just been looking at this a bit.
Not sure if it's something Microsoft have done, however, it seems that building with msbuild 17 works.
I used the command $env:PackageVersion = '10.11.12'; msbuild -t:build .\Release.proj
This would allow the appveyor image to be upgraded to Visual Studio 2022 if it is this case and this has just worked, right?
Edit: Nope, looks like I have .NET 4.0 and 4.5 targetting packs installed locally from something else.