can dotnet tool package contain bits for .net core 3.1 and 5.0 ? #13116
Open
Description
opened on Aug 26, 2020
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