Skip to content
This repository was archived by the owner on Aug 5, 2019. It is now read-only.

Support for .NET Core without DNX #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

droyad
Copy link

@droyad droyad commented Jul 25, 2016

Hi, I'm sharing my findings on making this project work with the current .NET Core tooling. Given that the tooling is going to change in 6 months, it may not be worth integrating this.

The below code changes will create a nuget that will work with dotnet without requiring DNX to be installed. In the destination project, the following would need to be added to the project.json:

"tools": {
    "SimpleGitVersion.DNXCommands": {
      "version": "0.19.1",
      "imports": "net45"
    }
  },
  "scripts": {
    "precompile": "dotnet sgv update"
  }

From what I can gather is that any exe starting with dotnet- becomes callable in the build pipline as shown above in the precompile setting.

However I can't figure out why it doesn't reference the chained dependency (SimpleGitVersion.Core) despite it downloading and installing it. So I've just jammed the required files in the toplevel package.

If you want to merge it in, but needs some changes, let me know.

…hat it can be run in the .NET Core build pipeline
@bcrosnier
Copy link

I suspect it may have to do with all of the binary projects being MSBuild (.csproj) projects instead of dotnet CLI (.project.json) packages.
I'm not sure if dotnet restore works well with those.

I'd propose an opportunity to see if it works when using a standard dotnet cli project (eg. empty solution, new dotnet cli project targeting net45, and use the code from DNXCommands and a NuGet reference for SimpleGitVersion.Core) but, yes, they are indeed planning to scrap project.json and go back to MSBuild and .csproj, so it would be at most a temporary stopgap.

Would this break behavior for people still using dnx instead of dotnet?

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

Successfully merging this pull request may close these issues.

2 participants