Skip to content

can dotnet tool package contain bits for .net core 3.1 and 5.0 ? #13116

Open
@lovettchris

Description

Does it make sense to package my "dotnet tool" using nuspec with bits for .net 3.1 and 5.0 so users who only have 3.1 can use my tool and users with 5.0 get the newer version?

If so how does one author the .nuspec to do this? or do I have to create different package versions then have the user know which version to ask for that is compatible with their chosen platform? (which is harder for the user to figure out?)

And do I do it simply like this?

  <files>
    <!-- .NET Core 3.1 -->
    <file src="..\..\bin\netcoreapp3.1\*.dll" target="tools\netcoreapp3.1\any" />
    <file src="..\..\bin\netcoreapp3.1\*.xml" target="tools\netcoreapp3.1\any" />
    <file src="..\..\bin\netcoreapp3.1\*.pdb" target="tools\netcoreapp3.1\any" />
    <file src="..\..\bin\netcoreapp3.1\*.config" target="tools\netcoreapp3.1\any" />
    <file src="..\..\bin\netcoreapp3.1\*.runtimeconfig.json" target="tools\netcoreapp3.1\any" />
    
    <!-- .NET Core 5.0 -->
    <file src="..\..\bin\net5.0\*.dll" target="tools\net5.0\any" />
    <file src="..\..\bin\net5.0\*.xml" target="tools\net5.0\any" />
    <file src="..\..\bin\net5.0\*.pdb" target="tools\net5.0\any" />
    <file src="..\..\bin\net5.0\*.config" target="tools\net5.0\any" />
    <file src="..\..\bin\net5.0\*.runtimeconfig.json" target="tools\net5.0\any" />
    <!-- Assets -->
    <file src="..\..\docs\assets\images\icon.png" target="images" />

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions