-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Move PackageValidation to sdk with opt-in flag #19209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a669893
inbox the package Validation
Anipik 68bc489
add min roslun version check, remove hashcode version and some other …
Anipik fe75633
fix some test failures and roslyn min version
Anipik 6b373d0
add msbuld targets to the package.
Anipik d1f5ec3
add support of multitarget projects
Anipik a30b043
Removing extra space
Anipik 0606543
use tasks existing property
Anipik 974e68e
Revert "use tasks existing property"
safern File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 6 additions & 30 deletions
36
...ility/Microsoft.DotNet.PackageValidation/build/Microsoft.DotNet.PackageValidation.targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,10 @@ | ||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | ||
<Project> | ||
<UsingTask TaskName="Microsoft.DotNet.PackageValidation.ValidatePackage" AssemblyFile="$(DotNetPackageValidationAssembly)" /> | ||
<PropertyGroup> | ||
<DotNetPackageValidationAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.DotNet.PackageValidation.dll</DotNetPackageValidationAssembly> | ||
Anipik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<DotNetPackageValidationAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.DotNet.PackageValidation.dll</DotNetPackageValidationAssembly> | ||
<UseCompatibilityPackage>true</UseCompatibilityPackage> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(DisablePackageBaselineValidation)' != 'true' and '$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''"> | ||
<PackageDownload Include="$([MSBuild]::ValueOrDefault('$(PackageValidationBaselineName)', '$(PackageId)'))" Version="[$(PackageValidationBaselineVersion)]" /> | ||
</ItemGroup> | ||
|
||
<Target Name="RunPackageValidation" | ||
AfterTargets="Pack" | ||
Condition="'$(IsPackable)' == 'true'"> | ||
|
||
<PropertyGroup> | ||
<PackageValidationBaselineName Condition="'$(PackageValidationBaselineName)' == ''">$(PackageId)</PackageValidationBaselineName> | ||
<PackageValidationBaselinePath Condition="'$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''">$([MSBuild]::NormalizePath('$(NuGetPackageRoot)', '$(PackageValidationBaselineName.ToLower())', '$(PackageValidationBaselineVersion)', '$(PackageValidationBaselineName.ToLower()).$(PackageValidationBaselineVersion).nupkg'))</PackageValidationBaselinePath> | ||
<GenerateCompatibilitySuppressionFile Condition="'$(GenerateCompatibilitySuppressionFile)' == ''">false</GenerateCompatibilitySuppressionFile> | ||
<_compatibilitySuppressionFilePath>$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', 'CompatibilitySuppressions.xml'))</_compatibilitySuppressionFilePath> | ||
<CompatibilitySuppressionFilePath Condition="'$(CompatibilitySuppressionFilePath)' == '' and (Exists($(_compatibilitySuppressionFilePath)) or '$(GenerateCompatibilitySuppressionFile)' == 'true')">$(_compatibilitySuppressionFilePath)</CompatibilitySuppressionFilePath> | ||
</PropertyGroup> | ||
|
||
<!-- PackageTargetPath isn't exposed by NuGet: https://github.com/NuGet/Home/issues/6671. --> | ||
<Microsoft.DotNet.PackageValidation.ValidatePackage | ||
PackageTargetPath="$([MSBuild]::ValueOrDefault('$(PackageTargetPath)', '$([MSBuild]::NormalizePath('$(PackageOutputPath)', '$(PackageId).$(PackageVersion).nupkg'))'))" | ||
RuntimeGraph="$(RuntimeIdentifierGraphPath)" | ||
NoWarn="$(NoWarn)" | ||
RunApiCompat="$([MSBuild]::ValueOrDefault('$(RunApiCompat)', 'true'))" | ||
EnableStrictModeForCompatibleTfms="$([MSBuild]::ValueOrDefault('$(EnableStrictModeForCompatibleTfms)', 'true'))" | ||
EnableStrictModeForCompatibleFrameworksInPackage="$([MSBuild]::ValueOrDefault('$(EnableStrictModeForCompatibleFrameworksInPackage)', 'false'))" | ||
GenerateCompatibilitySuppressionFile="$(GenerateCompatibilitySuppressionFile)" | ||
CompatibilitySuppressionFilePath="$(CompatibilitySuppressionFilePath)" | ||
BaselinePackageTargetPath="$(PackageValidationBaselinePath)" | ||
DisablePackageBaselineValidation="$(DisablePackageBaselineValidation)"/> | ||
</Target> | ||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Compatibility.Common.targets" /> | ||
</Project> |
4 changes: 0 additions & 4 deletions
4
...oft.DotNet.PackageValidation/buildMultiTargeting/Microsoft.DotNet.PackageValidation.props
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...t.DotNet.PackageValidation/buildMultiTargeting/Microsoft.DotNet.PackageValidation.targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | ||
<Project> | ||
<Import Project="$(MSBuildThisFileDirectory)..\build\$(MSBuildThisFile)" /> | ||
</Project> | ||
</Project> |
4 changes: 0 additions & 4 deletions
4
src/Compatibility/Microsoft.DotNet.PackageValidation/sdk/Sdk.props
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
src/Compatibility/Microsoft.DotNet.PackageValidation/sdk/Sdk.targets
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.