Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Migrate to new project system #2719

Closed
9 tasks done
thecodejunkie opened this issue Mar 20, 2017 · 4 comments
Closed
9 tasks done

Migrate to new project system #2719

thecodejunkie opened this issue Mar 20, 2017 · 4 comments
Labels

Comments

@thecodejunkie
Copy link
Member

thecodejunkie commented Mar 20, 2017

The time has come to migrate away from the old *.csproj and project.json formats in favour of the new and improved *.csproj format that is supported by Visual Studio 2017 and Visual Studio Code

Todo

The following steps are required to be done on each repository

  • Migrate to the new project system using dotnet migrate (including adding missing projects and verify all tests) (@thecodejunkie)
  • Add Directory.build.props file and update all * .csproj files (see MiniProfiler for an example)
  • Add DisableImplicitFrameworkReferences element to all *.csproj for full-framework builds (see OwinHttpMessageHandler for an example)
  • Migrate back to netstandard1.3 again (need to update build.cake to reflect this, i.e all references of netstandard1.6)
  • Update build.cake to support running on Mono with the new project SDK (@akoeplinger confirmed that xbuild will no longer be able to build the new project format on mono`)
  • Update all test projects to use xunit 2.2.0 and xunit.runners.visualstudio 2.2.0

Adopting usage of NETStandard.Library

  1. Add the DisableImplicitPackgeReference element and set it to true
  2. Remove all our explicit package references for netstandard1.x TFM
  3. Add an explicit reference to NETStandard.Library v1.6.1
  4. Add what ever additional packages that we need that will not be part of NETStandard.Library

Demo projects

The only Nancy.Demo.* project that was ported to project.json was the new Nancy.Demo.Hosting.Kestrel project. Because of this, all other demo projects ends up with very bloated *.csproj files after dotnet migrate has been run on the projects. We need to clean these up and make them use the new, lighter, format

http://rehansaeed.com/cleaning-up-csproj/

Extra

Investigate using a single MSBuild invocation to speed up the execution time. Look at example https://gist.github.com/dasMulli/69f5303aa79a8cd4060e44891c90fd2d that was suggested by @dasMulli

Build script

Since we no longer can use xbuild to build using Mono on *nix, we are going to have to resort to using FrameworkPathOverride and defined at https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-rc4#using-net-framework-as-targets-framework-the-osxunix-build-fails i.e we need to update build.sh to include

export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/

It needs to point to 4.5 because of how Mono is formed to store their artificats http://www.mono-project.com/docs/about-mono/releases/4.4.0/#class-libraries

Note: The 4.5 folder contains the actual assemblies that are used during runtime. We’re considering these the latest assemblies from now on, i.e. right now they’re implementing .NET 4.6.1. Unfortunately, we couldn’t rename this folder as too many apps and libraries hardcoded checks for this path.

Repositories

We need to go through all repositories and migrate them + update the build scripts

  • Nancy
  • Nancy.Bootstrappers.Autofac
  • Nancy.Bootstrappers.Ninject
  • Nancy.Bootstrappers.StructureMap
  • Nancy.Bootstrappers.Unity
  • Nancy.Bootstrappers.Windsor
  • Nancy.Serialization.JsonNet
  • Nancy.Serialization.ProtBuf
  • Nancy.Serialization.ServiceStack
@thecodejunkie thecodejunkie added this to the 2.0-dangermouse milestone Mar 20, 2017
@cemremengu
Copy link
Contributor

cemremengu commented Mar 21, 2017

images

This looks like a hell of an epic

@sphiecoh
Copy link
Contributor

@thecodejunkie If you can point me to a branch where you have done one, I can help out.

@thecodejunkie
Copy link
Member Author

@sphiecoh I'm currently exploring a bit on my machine to get an idea of exactly what we want to do and how we do it. Once I've nailed all of that down, then I will complete the main Nancy repo and then we can take community help for the remaining repositories. 👍

@thecodejunkie
Copy link
Member Author

@cemremengu I'm using this as a semi-structured brain dump of stuff I can think of or come across while working on this 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants