Add license information and debug info to csproj
LiorBanai opened this issue · 13 comments
Hi,
This csproj has some nuget related information but no license info (and other nice to have properties).
it is good to add it so it will be shown in Visual Studio nuget management.
example:
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Thanks for the suggestion. I have updated the project file with your recommendations.
Hi, sorry to bother you again for this but since the nuget does not include the sections
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
it seems auto generated tools like https://github.com/tomchavakis/nuget-license do not show correct information and do nor pull the license in the reports:
is it possible to add those (since the license is MIT anyway).?
@uxsoft , do you think you could modify the dotnet.yml workflow so that a new .nuspec
file is created with every new release?
For example, the .nuspec
for the next release could look something like this:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<!-- Required elements-->
<id>xfx.CoreAudio</id>
<version>1.28.0</version>
<description>Windows CoreAudio wrapper for .NET</description>
<authors>xfx</authors>
<!-- Optional elements -->
<projectUrl>https://github.com/morphx666/CoreAudio</<projectUrl>
<license type="expression">MIT</license>
</metadata>
<!-- Optional 'files' node -->
</package>
Hi, Any update on this?
Hi @LiorBanai, it looks like @uxsoft never replied. I will take a closer look tomorrow and see if I can figure it out myself.
@LiorBanai please upgrade to 1.35.0 and let me know what's the output of the dotnet-project-licenses
tool.
also on nuget. org (rigt side).
compare to other nugets (mine for example:) https://www.nuget.org/packages/Analogy.LogViewer.Interfaces
I'll check later and update
thanks for the effort :)
On NuGet I can see that it now shows a link to display the LICENSE file.
I was hoping this would be preferable to just showing the license type.
from my perspective, as end user, it adds a layer of complexity: having the need to navigate to a different place to see the licesne type instead of directly at a glance on the site/VS package manager / Dotnet tools.
This will also may cause users not to use the package if they don't know immediately that it is MIT :)
with the new changes theres is now a link in the dotnet tool:
That makes sense. I will re-try the other method to just display the license type.
Wish we could have both options: display the license type as a hyperlink, like MIT.