Skip to content

Commit

Permalink
Move properties to NuGet.targets
Browse files Browse the repository at this point in the history
  • Loading branch information
zivkan committed Oct 30, 2023
1 parent 4a748e2 commit 9acb934
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/NuGet.Core/NuGet.Build.Tasks/NuGet.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,4 @@ Copyright (c) .NET Foundation. All rights reserved.
<CentralPackageVersionsFileImported>true</CentralPackageVersionsFileImported>
</PropertyGroup>

<!--
Setup default NuGet property values.
Visual Studio's project property page requires defaults to be set to inform customers what the default values are.
-->
<PropertyGroup>
<NuGetAudit Condition=" '$(NuGetAudit)' == '' ">true</NuGetAudit>
<NuGetAuditLevel Condition=" '$(NuGetAuditLevel)' == '' ">low</NuGetAuditLevel>
<NuGetAuditMode Condition=" '$(NuGetAuditMode)' == '' ">direct</NuGetAuditMode>
</PropertyGroup>

</Project>
13 changes: 13 additions & 0 deletions src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ Copyright (c) .NET Foundation. All rights reserved.
<_CentralPackageVersionsEnabled Condition="'$(ManagePackageVersionsCentrally)' == 'true' AND '$(CentralPackageVersionsFileImported)' == 'true'">true</_CentralPackageVersionsEnabled>
</PropertyGroup>

<!--
Visual Studio's project property page requires defaults to be set to inform customers what the default values are.
Project-system uses DefaultValueSourceLocation.AfterContext to detect when a customer's project changes the value, so these defaults must be set here in the targets file.
-->
<PropertyGroup>
<!-- Enable NuGetAudit by default -->
<NuGetAudit Condition=" '$(NuGetAudit)' == '' ">true</NuGetAudit>
<!-- Report on low severity vulnerabilities, and higher. Allowed values are: low, moderate, high, critical -->
<NuGetAuditLevel Condition=" '$(NuGetAuditLevel)' == '' ">low</NuGetAuditLevel>
<!-- Report known vulnerabilities on direct dependencies only. Allowed values are: direct, all -->
<NuGetAuditMode Condition=" '$(NuGetAuditMode)' == '' ">direct</NuGetAuditMode>
</PropertyGroup>

<PropertyGroup>
<!-- Exclude packages from changing restore inputs. -->
<_GenerateRestoreGraphProjectEntryInputProperties>ExcludeRestorePackageImports=true</_GenerateRestoreGraphProjectEntryInputProperties>
Expand Down

0 comments on commit 9acb934

Please sign in to comment.