How To Publish A Blazor Component To Nuget Gallery

Create your free account on nuget.org here.Please refer to my previous article BlazorGrid — A Reusable Grid Component For Blazor to create the BlazorGrid component, which we will publish in this tutorial.Source CodeGet the source code for BlazorGrid at GitHub.Configuring Project PropertiesBefore packaging the component as a nuget package, we need to specify certain information as the metadata for the component.Right click on BlazorGridComponent project >> select Properties..It will open a property window for the project..Select Package from the left side menu and furnish the details as explained below:Required fieldsPackage id: Give a unique name to your package..This is a case-insensitive field..It follows the .NET namespace naming conventions and does not allow spaces..This name is the unique identifier for your package at nuget.org.Package version: Provide the version for the initial release of package..You must update the version whenever you republish your package.Authors: Provide the author name..If there are multiple authors, provide a comma-separated list.Description: Provide a description for your package..What the package is about, what it does and any other relevant details.Optional fieldsCompany: Provide your organization name.Product: Provide a name for your product.Copyright: Put in the copyright info here.License URL: Path to the license file..Here we have provided path to an open source MIT license file that is bundled in the package itself.Project URL: URL of the site related to this package..It can be any URL such as your company home page URL, GitHub URL etc.Icon URL: URL to the image that can be displayed as the icon of the package..The allowed size is 64×64.Repository URL: If it is a public repository, provide the URL here.Repository type: The type of repository we are using.Tags: Provide relevant tags for the package.. More details

Leave a Reply