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

Is the dotnet5.4 TFM forward compatible with RC2? #53

Closed
richardszalay opened this issue Jan 25, 2016 · 6 comments
Closed

Is the dotnet5.4 TFM forward compatible with RC2? #53

richardszalay opened this issue Jan 25, 2016 · 6 comments

Comments

@richardszalay
Copy link

If I were to release a new version of a library with support for the dotnet5.4 moniker, will it be consumable from a project that targets .NET Core 1.0 RC2 (specifically a netstandard TFM) ,or will I need to explicitly release a new version that targets netstandardX?

(I realise these monikers aren't actually equivalent, its more about maintaining support for .NET Core)

@richardszalay
Copy link
Author

@davidfowl
Copy link
Member

Unfortunately, that's the wrong answer 😄 . dotnet5.x will not work with netstandard1.x. To work around this, you'll need to specify an imports statement:

{
    "frameworks": {
        "netstandard1.5": {
            "imports": "dotnet5.6",
            "dependencies": {
               "SomeDependency": "1.0.0"
            }
         }
     }
}

@richardszalay richardszalay reopened this Jan 25, 2016
@richardszalay
Copy link
Author

Is that syntax valid for RC1 or just RC2?

If RC2, does that mean that there's no way to publish a net-core-targetting-pcl package in RC1 that can be consumed by an RC2 project without releasing a new version?

If RC1, ignore that second part.

@davidfowl
Copy link
Member

Is that syntax valid for RC1 or just RC2?

RC2, part of the move is unifying dnu restore and nuget restore. DNU will be gone by the time RC2 ships. NuGet currently supports "imports" but not DNU, here's an example https://github.com/dotnet/cli/blob/master/src/Microsoft.DotNet.ProjectModel.Workspaces/project.json#L14. in RC2, we're adding support to make this an array so you can specify multiple overrides. NuGet/Home#1962

If RC2, does that mean that there's no way to publish a net-core-targetting-pcl package in RC1 that can be consumed by an RC2 project without releasing a new version?

Correct. We want to keep netstandard clean, so it'll likely be a year or so before people can fully remove imports. This allows us to remove any backwards compat burden from the TFM and allows users to move forward with existing packages.

@richardszalay
Copy link
Author

Just to clarify, the purpose of importing dotnet5.x would be to support consuming an RC2 library from RC1, correct? (Otherwise I'm failing to understand why I would include it)

Edit: Wait, I think I understand now - "import" allows an RC2 "netstandard"-targetting application to consume an RC1 "dotnet5.X" library like it was targetting netstandard.

@richardszalay
Copy link
Author

Closing. Based on conversations in linked issues, my "edit" assumption is correct.

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

No branches or pull requests

2 participants