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

NETStandard / .NET Core support #235

Closed
clairernovotny opened this issue May 22, 2016 · 1 comment
Closed

NETStandard / .NET Core support #235

clairernovotny opened this issue May 22, 2016 · 1 comment
Labels
Milestone

Comments

@clairernovotny
Copy link
Member

Currently Refit does not work with .net core projects. With .NET Core moving to use msbuild, we should still be able to invoke the targets in the same way.

The easiest course of action is to just expose refit as netstandard and rely on mono to exec the tool as per today. The next option is to make the generator tool a netcore app itself or a dotnet command (dotnet-refit) and enable a pre-build script to invoke it.

@clairernovotny
Copy link
Member Author

Workaround for now:

VS 2015 Update 2 adds support for changing a regular CSProj PCL to support .NET Standard, so create a csproj pcl and set it to .net standard 1.4

then use this project.json for it:

{
  "dependencies": {
    "NETStandard.Library": "1.5.0-rc2-24027",
    "refit": "2.4.1",
    "Newtonsoft.Json": "8.0.3"
  },
  "frameworks": {
    "netstandard1.4": {
      "imports": ["dotnet", "portable-net45+win8"]
    }
  }
}

the imports are needed because refit doesn't explicitly support netstandard yet

Because it's a csproj, the targets work as expected. You can then add a reference to it from your asp.net 1.0 website or from another xproj like this:

"MyPclLibrary": {
      "target": "project"
    }

@clairernovotny clairernovotny added this to the v2.5.0 milestone Aug 9, 2016
@lock lock bot added the outdated label Jun 25, 2019
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
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

1 participant