-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use csproj as pack input instead of nuspec
Now that sourcelink is a native part of the .NET SDK, Arcade doesn't bring sourcelink packages in anymore. Now that the cyclic package dependency is avoided, these projects don't need to use nuspecs anymore. This removes custom infrastructure and allows better source build controls. I diffed the produced packages and the content in the .NETCoreApp folder is identical (a deps.json file is added but that's recommended by msbuild for build tasks these days). The .NET Framework output is significantly different as it now includes all dependencies that aren't supplied by the MSBuild inside Visual Studio.
- Loading branch information
1 parent
ed56d42
commit 13aebe2
Showing
51 changed files
with
157 additions
and
395 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<IncludeBuildOutput>false</IncludeBuildOutput> | ||
<IsPackable>true</IsPackable> | ||
<!-- Build Tasks should not include any dependencies --> | ||
<SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == ''">true</SuppressDependenciesWhenPacking> | ||
<!-- Build Tasks should have this set per https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Versioning.md#recommended-settings --> | ||
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion> | ||
<BuildTaskTargetFolder Condition="'$(BuildTaskTargetFolder)' == ''">tools</BuildTaskTargetFolder> | ||
<PackTasks Condition="'$(PackTasks)' == ''">true</PackTasks> | ||
<TargetsForTfmSpecificContentInPackage Condition="'$(PackTasks)' == 'true'">$(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackageCore;_AddBuildOutputToPackageDesktop</TargetsForTfmSpecificContentInPackage> | ||
<DevelopmentDependency>true</DevelopmentDependency> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Default to including all *.props and *.targets files | ||
from the project directory into the NuGet package root | ||
--> | ||
<ItemGroup Condition="'$(EnableDefaultItems)' != 'false'"> | ||
<None Condition="'$(EnableDefaultNoneItems)' != 'false'" | ||
Include="**/*.props;**/*.targets" | ||
Pack="true" | ||
PackagePath="%(RecursiveDir)%(Filename)%(Extension)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="$(RepoRoot)License.txt" PackagePath="LICENSE.txt" Pack="true"/> | ||
</ItemGroup> | ||
|
||
<!-- Exclude assemblies that MSBuild ships with. --> | ||
<ItemGroup> | ||
<PackageReference Update="Microsoft.Build" Publish="false" /> | ||
<PackageReference Update="Microsoft.Build.Framework" Publish="false" /> | ||
<PackageReference Update="Microsoft.Build.Tasks.Core" Publish="false" /> | ||
<PackageReference Update="Microsoft.Build.Utilities.Core" Publish="false" /> | ||
<PackageReference Update="Microsoft.NET.StringTools" Publish="false" /> | ||
<PackageReference Update="System.Collections.Immutable" Publish="false" /> | ||
</ItemGroup> | ||
|
||
<!-- Exclude assemblies that are already provided by the SDK, next to MSBuild. --> | ||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'"> | ||
<PackageReference Update="Newtonsoft.Json" Publish="false" /> | ||
<PackageReference Update="NuGet.Commands" Publish="false" /> | ||
<PackageReference Update="NuGet.Common" Publish="false" /> | ||
<PackageReference Update="NuGet.Configuration" Publish="false" /> | ||
<PackageReference Update="NuGet.Frameworks" Publish="false" /> | ||
<PackageReference Update="NuGet.Packaging" Publish="false" /> | ||
<PackageReference Update="NuGet.ProjectModel" Publish="false" /> | ||
<PackageReference Update="NuGet.Versioning" Publish="false" /> | ||
</ItemGroup> | ||
|
||
<!-- Don't include assemblies that are inbox in Desktop MSBuild --> | ||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> | ||
<PackageReference Update="System.Buffers" Publish="false" /> | ||
<PackageReference Update="System.Memory" Publish="false" /> | ||
<PackageReference Update="System.Numerics.Vectors" Publish="false" /> | ||
<PackageReference Update="System.Reflection.Metadata" Publish="false" /> | ||
<PackageReference Update="System.Reflection.MetadataLoadContext" Publish="false" /> | ||
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Publish="false" /> | ||
<PackageReference Update="System.Text.Encodings.Web" Publish="false" /> | ||
<PackageReference Update="System.Text.Json" Publish="false" /> | ||
<PackageReference Update="System.Threading.Tasks.Dataflow" Publish="false" /> | ||
<PackageReference Update="System.Threading.Tasks.Extensions" Publish="false" /> | ||
<PackageReference Update="System.ValueTuple" Publish="false" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<!-- | ||
Update all PackageReference items to default Publish to true. | ||
This forces the publish output to contain the dlls. | ||
--> | ||
<PackageReference Update="@(PackageReference)"> | ||
<Publish Condition="'%(PackageReference.Publish)' == ''">true</Publish> | ||
<ExcludeAssets Condition="'%(PackageReference.Publish)' == 'false'">runtime</ExcludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<!-- Publish .NET Core assets and include them in the package under $(BuildTaskTargetFolder) directory. --> | ||
<Target Name="_AddBuildOutputToPackageCore" DependsOnTargets="Publish" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'"> | ||
<ItemGroup> | ||
<TfmSpecificPackageFile Include="$(PublishDir)**" | ||
PackagePath="$(BuildTaskTargetFolder)/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<!-- Include .NET Framework build outputs in the package under $(BuildTaskTargetFolder) directory. --> | ||
<Target Name="_AddBuildOutputToPackageDesktop" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'"> | ||
<ItemGroup> | ||
<TfmSpecificPackageFile Include="$(OutputPath)**" PackagePath="$(BuildTaskTargetFolder)/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains 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 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 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
10 changes: 0 additions & 10 deletions
10
src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.nuspec
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj
This file contains 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 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
15 changes: 0 additions & 15 deletions
15
src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.nuspec
This file was deleted.
Oops, something went wrong.
This file contains 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 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
21 changes: 0 additions & 21 deletions
21
src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.nuspec
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ureDevOpsServer.Git.UnitTests/Microsoft.SourceLink.AzureDevOpsServer.Git.UnitTests.csproj
This file contains 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 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
18 changes: 0 additions & 18 deletions
18
src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.nuspec
This file was deleted.
Oops, something went wrong.
This file contains 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
2 changes: 1 addition & 1 deletion
2
src/SourceLink.AzureRepos.Git.UnitTests/Microsoft.SourceLink.AzureRepos.Git.UnitTests.csproj
This file contains 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 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.