Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure .nupkg version and other metadata in JetBrains Rider

I've been trying to figure out all day how JetBrains's Rider sets the .nupkg version and other metadata.

I can't seem to find any configuration window on the whole IDE to do this, or if I have to have a special file with the data on my project.

The .nupkg data always defaults to the following (where MyProjectName is the name of my project) whenever I use Rider to "Pack Solution" or "Pack Selected Projects":

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>MyProjectName</id>
    <version>1.0.0</version>
    <authors>MyProjectName</authors>
    <owners>MyProjectName</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Package Description</description>
    <dependencies>
      ...
    </dependencies>
  </metadata>
</package>

I've looked at Microsoft's Docs for Packages and JetBrains Rider Help, but none gave me any hint at what must be done.

I'm using Rider 2017.3.1 on my Ubuntu 14.04.

like image 304
cavpollo Avatar asked Oct 12 '25 09:10

cavpollo


1 Answers

After googling around to no avail, I found out that I should modify the .csproj file. Also, as @xtmq pointed out, the Microsoft .Net Core docs specify which are the available tags recognized as NuGet metadata properties.

So for example, we could add the values inside the PropertyGroup section so that Rider generates the .nupkg file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>
      ...
    </TargetFrameworks>
    <Authors>cavpollo</Authors>
    <Version>1.0.1</Version>
    <Description>My project Description</Description>
  </PropertyGroup>
  <ItemGroup>
      ...
  </ItemGroup>
</Project>
like image 197
cavpollo Avatar answered Oct 16 '25 11:10

cavpollo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!