Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Project setup for .net core showing how nuspec will get updated as part of a build
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>project</id>
<version>0.0.1</version>
<authors>authors</authors>
<owners>Owners</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>package desciptions</description>
</metadata>
<files>
<file src="file.dll" target="file.dll" />
</files>
</package>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>ProjectName</RootNamespace>
</PropertyGroup>
<ItemGroup>
<!--removed information -->
</ItemGroup>
<Target Name="SetNuspecProperties" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<NuspecProperties>$(NuspecProperties);id=$(AssemblyName)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);config=$(Configuration)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);version=$(PackageVersion)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);description=$(Description)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);authors=$(Authors)</NuspecProperties>
</PropertyGroup>
<Message Importance="high" Text="NuspecProperties: $(NuspecProperties)" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.