NuGet | Blog | Limilabs https://www.limilabs.com/blog Using Limilabs .net components Fri, 08 Oct 2010 13:08:28 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.5 Update NuSpec version from MsBuild https://www.limilabs.com/blog/update-nuspec-version-from-msbuild Fri, 08 Oct 2010 13:08:28 +0000 http://www.limilabs.com/blog/?p=1185 Here’s the sample script that updates NuGet version node in NuSpec file:

The post Update NuSpec version from MsBuild first appeared on Blog | Limilabs.

]]>
Here’s the sample script that updates NuGet version node in NuSpec file:

<target Name="UpdateNuspec">
    <getAssemblyIdentity AssemblyFiles="$(ReleaseFolder)/Redistributables/YourAssembly.dll">
      <output TaskParameter="Assemblies" ItemName="YourAssemblyInfo"/>
    </getAssemblyIdentity>
    <xmlUpdate
        Prefix="nu"
        Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
        XmlFileName="YourAssembly.nuspec"
        XPath="package/nu:metadata/nu:version"
        Value="%(YourAssemblyInfo.Version)"/>
</target>

The post Update NuSpec version from MsBuild first appeared on Blog | Limilabs.

]]>