-
Notifications
You must be signed in to change notification settings - Fork 104
Description
Summary:
Component Detection does not detect nuspec version if it's a variable $version$
Details:
How does the variable version work in Nuget ?
a .nuspec file in NuGet can have the version specified as a variable. This is typically done using a token that gets replaced with the actual version number at the time of packaging. The token for the version is
Here's a simplified example of how you might specify the version in a .nuspec file using a variable:
<?xml version="1.0"?>
<package >
<metadata>
<id>ExamplePackage</id>
<version>$version$</version>
<authors>ExampleAuthor</authors>
<owners>ExampleOwner</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Example description</description>
<releaseNotes>This release includes...</releaseNotes>
</metadata>
</package>
When you pack this NuGet package, you would replace
The component Detection generates following error log for this:
Version '$version$' from D:\a\_work\1\s\src\Setup.PowerShell\DDSetup.nuspec could not be parsed as a NuGet version
Version '$version$' from D:\a\_work\1\s\src\Setup.Tools\Microsoft.VisualStudio.Setup.Tools.nuspec could not be parsed as a NuGet version
Version '$version$' from D:\a\_work\1\s\src\UpdateDriver\UpdateDriver.nuspec could not be parsed as a NuGet version
Version '$version$' from D:\a\_work\1\s\src\VSInstaller.Managed\VSInstaller.nuspec could not be parsed as a NuGet version