Skip to content

Commit

Permalink
Use the fully qualified name for the Zip and Unzip tasks (#803)
Browse files Browse the repository at this point in the history
Use the fully qualified task names Microsoft.Build.Tasks.Unzip and Microsoft.Build.Tasks.ZipDirectory to avoid name collisions with other msbuild task packages.

Co-authored-by: Sarah Oslund <sfoslund@microsoft.com>
Co-authored-by: Dave Tryon <45672944+DaveTryon@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent 869dbe6 commit 130bb04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Microsoft.Sbom.Targets/Microsoft.Sbom.Targets.targets
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$([System.IO.Path]::Combine($(PackageOutputFullPath), $(PackageId).$(PackageVersion).$(ShortUnzipGuidFolder).temp))
</NugetPackageUnzip>
</PropertyGroup>
<Unzip DestinationFolder="$(NugetPackageUnzip)" SourceFiles="$(NugetPackage)" OverwriteReadOnlyFiles="true" ContinueOnError="ErrorAndContinue" />
<Microsoft.Build.Tasks.Unzip DestinationFolder="$(NugetPackageUnzip)" SourceFiles="$(NugetPackage)" OverwriteReadOnlyFiles="true" ContinueOnError="ErrorAndContinue" />

<!--
Call the SBOM task to generate a SBOM. The SBOM will be generated at the BuildDropPath location, which is the root folder
Expand All @@ -73,7 +73,7 @@
</GenerateSbom>

<!-- Zip the Nuget package back up and delete the temporary unzipped package. -->
<ZipDirectory SourceDirectory="$(NugetPackageUnzip)" DestinationFile="$(NugetPackage)" Overwrite="true" ContinueOnError="ErrorAndContinue" />
<Microsoft.Build.Tasks.ZipDirectory SourceDirectory="$(NugetPackageUnzip)" DestinationFile="$(NugetPackage)" Overwrite="true" ContinueOnError="ErrorAndContinue" />
<RemoveDir Directories="$(NugetPackageUnzip)" ContinueOnError="WarnAndContinue" />
</Target>
</Project>

0 comments on commit 130bb04

Please sign in to comment.