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

Old csproj with <PackageReference> requires <BaseNuGetRuntimeIdentifier> and <RuntimeIdentifier> #4558

Closed
davidfowl opened this issue Feb 10, 2017 · 6 comments
Assignees
Milestone

Comments

@davidfowl
Copy link
Member

I have .NET 4.5.2 project with using the new <PackageReference> support. I installed Microsoft.AspNetCore.Kestrel which has a dependency on libv which has RID folders.

The relevant part of my project file looks like this:

<PropertyGroup>
    <BaseNuGetRuntimeIdentifier>win7-x86</BaseNuGetRuntimeIdentifier>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel">
      <Version>1.1.0</Version>
    </PackageReference>
  </ItemGroup>

image

Adding <RuntimeIdentifier>win7-x86</RuntimeIdentifier> works:

<PropertyGroup>
    <BaseNuGetRuntimeIdentifier>win7-x86</BaseNuGetRuntimeIdentifier>
    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel">
      <Version>1.1.0</Version>
    </PackageReference>
  </ItemGroup>
@rrelyea
Copy link
Contributor

rrelyea commented Feb 13, 2017

This is likely something we'll address in 4.0.1 - we have tried in 4.0 to put some RIDs in a few target files to handle:

  • uwp scenarios
  • .net framework scenarios.

what about this scenario isn't ideal?

@davidfowl
Copy link
Member Author

Not sure what you're asking. Are you a asking why duplicating the same RID in 2 different properties isn't ideal?

@rrelyea
Copy link
Contributor

rrelyea commented Feb 13, 2017

Was asking the person who will be investigating.

@jainaashish jainaashish self-assigned this Feb 13, 2017
@jainaashish
Copy link
Contributor

by default BaseNuGetRuntimeIdentifier will not be there so RuntimeIdentifier property will be set correctly and you won't see this issue. But since you explicitly set BaseNuGetRuntimeIdentifier to win7-x86 so RuntimeIdentifier isn't set by default so you also need to set this explicitly.

Now I don't understand what's the scenario to set BaseNuGetRuntimeIdentifier explicitly to win7-x86 and should we implicitly set RuntimeIdentifier in that case or just ask user to set this property as well?

@davidfowl
Copy link
Member Author

It's ridiculous to force users to set both properties to the same value. In face BaseRuntimeNuGetIdentifier needs to be deprecated. It's an artifact of the old nuget task and runtime identifier should be the only one that matters now. Setting the RID is sometimes required to deploy the right assets (like when you target a .net framework project and reference a package that has native assets)

@jainaashish
Copy link
Contributor

Agreed, we shouldn't ask user to set both properties but I doubt we will be targeting it for RTM we can have a better solution in 4.0.1, About deprecating BaseRuntimeNuGetIdentifier, I doubt it since the same nuget task is also being used for PackageReference (non xplat scenarios) but we can certainly do better when user set BaseRuntimeNuGetIdentifier property without asking him to set RuntimeIdentifier

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

No branches or pull requests

4 participants