From c056a876e7787140091bdb2adfe2bf12e5259030 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 27 Oct 2023 11:50:29 +0200 Subject: [PATCH 1/4] 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. --- README.md | 12 +- eng/BuildTask.targets | 118 ++++++++++++++++++ src/Directory.Build.props | 9 +- src/Directory.Build.targets | 32 +---- .../Microsoft.Build.StandardCI.csproj | 13 +- .../Microsoft.Build.StandardCI.nuspec | 10 -- .../Microsoft.Build.StandardCI.props | 4 + ...Microsoft.Build.Tasks.Git.UnitTests.csproj | 2 +- .../Microsoft.Build.Tasks.Git.csproj | 14 +-- .../Microsoft.Build.Tasks.Git.nuspec | 15 --- .../build/Microsoft.Build.Tasks.Git.props | 4 +- .../Microsoft.Build.Tasks.Git.props | 4 + .../Microsoft.Build.Tasks.Git.targets | 4 + .../Microsoft.Build.Tasks.Tfvc.csproj | 14 +-- .../Microsoft.Build.Tasks.Tfvc.nuspec | 21 ---- .../build/Microsoft.Build.Tasks.Tfvc.props | 2 +- .../Microsoft.Build.Tasks.Tfvc.props | 4 + .../Microsoft.Build.Tasks.Tfvc.targets | 4 + ...ink.AzureDevOpsServer.Git.UnitTests.csproj | 2 +- ...ft.SourceLink.AzureDevOpsServer.Git.csproj | 20 +-- ...ft.SourceLink.AzureDevOpsServer.Git.nuspec | 18 --- ...t.SourceLink.AzureDevOpsServer.Git.targets | 4 +- ...SourceLink.AzureRepos.Git.UnitTests.csproj | 2 +- ...Microsoft.SourceLink.AzureRepos.Git.csproj | 20 +-- ...Microsoft.SourceLink.AzureRepos.Git.nuspec | 18 --- ...icrosoft.SourceLink.AzureRepos.Git.targets | 4 +- ...icrosoft.SourceLink.AzureRepos.Tfvc.csproj | 17 ++- ...icrosoft.SourceLink.AzureRepos.Tfvc.nuspec | 16 --- ...crosoft.SourceLink.AzureRepos.Tfvc.targets | 3 +- ....SourceLink.Bitbucket.Git.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.Bitbucket.Git.csproj | 20 +-- .../Microsoft.SourceLink.Bitbucket.Git.nuspec | 18 --- ...Microsoft.SourceLink.Bitbucket.Git.targets | 4 +- ...crosoft.SourceLink.Common.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.Common.csproj | 14 +-- .../Microsoft.SourceLink.Common.nuspec | 14 --- .../build/Microsoft.SourceLink.Common.props | 5 +- .../Microsoft.SourceLink.Common.props | 4 + .../Microsoft.SourceLink.Common.targets | 4 + ...oft.SourceLink.Git.IntegrationTests.csproj | 2 +- ...crosoft.SourceLink.GitHub.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.GitHub.csproj | 20 +-- .../Microsoft.SourceLink.GitHub.nuspec | 18 --- .../build/Microsoft.SourceLink.GitHub.targets | 4 +- ...crosoft.SourceLink.GitLab.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.GitLab.csproj | 20 +-- .../Microsoft.SourceLink.GitLab.nuspec | 18 --- .../build/Microsoft.SourceLink.GitLab.targets | 4 +- ...crosoft.SourceLink.GitWeb.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.GitWeb.csproj | 20 +-- .../Microsoft.SourceLink.GitWeb.nuspec | 18 --- .../build/Microsoft.SourceLink.GitWeb.targets | 4 +- ...icrosoft.SourceLink.Gitea.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.Gitea.csproj | 20 +-- .../Microsoft.SourceLink.Gitea.nuspec | 18 --- .../build/Microsoft.SourceLink.Gitea.targets | 4 +- ...icrosoft.SourceLink.Gitee.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.Gitee.csproj | 20 +-- .../Microsoft.SourceLink.Gitee.nuspec | 18 --- .../build/Microsoft.SourceLink.Gitee.targets | 4 +- ...icrosoft.SourceLink.Tools.UnitTests.csproj | 2 +- .../Microsoft.SourceLink.Tools.Package.csproj | 15 +-- .../DotNetSdk/DotNetSdkTestBase.cs | 14 +-- src/TestUtilities/TestUtilities.csproj | 6 +- .../dotnet-sourcelink.csproj | 2 +- 65 files changed, 313 insertions(+), 445 deletions(-) create mode 100644 eng/BuildTask.targets delete mode 100644 src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.nuspec create mode 100644 src/Microsoft.Build.StandardCI/buildTransitive/Microsoft.Build.StandardCI.props delete mode 100644 src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.nuspec create mode 100644 src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.props create mode 100644 src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.targets delete mode 100644 src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.nuspec create mode 100644 src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.props create mode 100644 src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.targets delete mode 100644 src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.nuspec delete mode 100644 src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.nuspec delete mode 100644 src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.nuspec delete mode 100644 src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.nuspec delete mode 100644 src/SourceLink.Common/Microsoft.SourceLink.Common.nuspec create mode 100644 src/SourceLink.Common/buildTransitive/Microsoft.SourceLink.Common.props create mode 100644 src/SourceLink.Common/buildTransitive/Microsoft.SourceLink.Common.targets delete mode 100644 src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.nuspec delete mode 100644 src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.nuspec delete mode 100644 src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.nuspec delete mode 100644 src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.nuspec delete mode 100644 src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.nuspec diff --git a/README.md b/README.md index ab581e87..9f9f1437 100644 --- a/README.md +++ b/README.md @@ -182,9 +182,9 @@ The only feature currently supported is mapping of source files to the source re ## Prerequisites for .NET projects -Source Link supports classic .NET Framework projects as well as .NET SDK projects, that is projects that import `Microsoft.NET.Sdk` (e.g. like so: ``). The project may target any .NET Framework or .NET Core App/Standard version. All PDB formats are supported: Portable, Embedded and Windows PDBs. +Source Link supports classic .NET Framework projects as well as .NET SDK projects, that is projects that import `Microsoft.NET.Sdk` (e.g. like so: ``). The project may target .NET, .NET Framework or .NET Standard. All PDB formats are supported: Portable, Embedded and Windows PDBs. -[.NET Core SDK 2.1.300](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300) or newer is required for .NET SDK projects. If building via desktop `msbuild` you'll need version 15.7 or higher. +[.NET 8 SDK](https://www.microsoft.com/net/download/dotnet/8.0) or newer is required for .NET SDK projects. If building via desktop `msbuild` you'll need version 16.0 or higher. The following features are not available in projects that do not import `Microsoft.NET.Sdk`: - Automatic inclusion of commit SHA in `AssemblyInformationalVersionAttribute`. @@ -200,8 +200,6 @@ The VC++ linker supports `/SOURCELINK` [switch](https://docs.microsoft.com/en-us ## Known issues -- `EmbedUntrackedSources` does not work in Visual Basic projects that use .NET SDK: https://github.com/dotnet/sourcelink/issues/193 (fixed in Visual Studio 2019) -- Issue when building WPF projects with `/p:ContinuousIntegrationBuild=true`: https://github.com/dotnet/sourcelink/issues/91 - Issue when building WPF projects with embedding sources on and `BaseIntermediateOutputPath` not a subdirectory of the project directory: https://github.com/dotnet/sourcelink/issues/492 ## PDB distributions @@ -222,7 +220,7 @@ Keep in mind that including PDBs in the .nupkg increases the size of the package - They do not support Windows PDBs (generated by VC++, or for managed projects that set build property `DebugType` to `full`) - They require the library to be built by newer C#/VB compiler (Visual Studio 2017 Update 9). -- The consumer of the package also needs Visual Studio 2017 Update 9 debugger. +- The consumer of the package also needs Visual Studio 2022 or newer. - Not supported by [Azure DevOps Artifacts](https://azure.microsoft.com/en-us/services/devops/artifacts) service. Consider including PDBs in the main package if it is not possible to use .snupkg for the above reasons. @@ -230,12 +228,12 @@ For managed projects, consider switching to Portable PDBs by setting `DebugType` ## Builds -Pre-release builds are available from Azure DevOps public feed: `https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json` ([browse](https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet8)). +Pre-release builds are available from Azure DevOps public feed: `https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json` ([browse](https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet9)). [![Build Status](https://dnceng.visualstudio.com/public/_apis/build/status/SourceLink%20PR?branchName=main)](https://dnceng.visualstudio.com/public/_build/latest?definitionId=297?branchName=main) ## Experience in Visual Studio -The following screenshot demonstrates debugging a NuGet package referenced by an application, with source automatically downloaded from GitHub and used by Visual Studio 2017. +The following screenshot demonstrates debugging a NuGet package referenced by an application, with source automatically downloaded from GitHub and used by Visual Studio. ![sourcelink-example](https://user-images.githubusercontent.com/2608468/39667937-10d7dabe-5076-11e8-815e-935724b3a783.PNG) diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets new file mode 100644 index 00000000..a7b2a853 --- /dev/null +++ b/eng/BuildTask.targets @@ -0,0 +1,118 @@ + + + + + false + true + + true + tools + true + $(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackageCore;_AddBuildOutputToPackageDesktop + true + + $(NoWarn);NU5128 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + all + + + + + + + + + + + + + + + + + + + net + + + + + + + + + + netframework + + + + + + + \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4407f802..41ecf24b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,4 +1,5 @@ + @@ -9,11 +10,5 @@ true - - - - false - + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 5a064d1e..066d72a1 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,25 +1,7 @@ - - - - $(NetCurrent) - - - - - - - - - - - <_ProjectDefinedPackageId>$(PackageId) - *fake_packageid_for_project_$(MSBuildProjectName)* - + - - - $(_ProjectDefinedPackageId) - $(AssemblyName) - $(MSBuildProjectName) - - - diff --git a/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj b/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj index ac6685ac..97453163 100644 --- a/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj +++ b/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj @@ -2,20 +2,11 @@ netstandard2.0 - true true Standard CI targets. Standard CI msbuild targets - true - - $(NoWarn);NU5128 - true + true + false - - - - \ No newline at end of file diff --git a/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.nuspec b/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.nuspec deleted file mode 100644 index 53cef9c9..00000000 --- a/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.nuspec +++ /dev/null @@ -1,10 +0,0 @@ - - - - $CommonMetadataElements$ - - - $CommonFileElements$ - - - \ No newline at end of file diff --git a/src/Microsoft.Build.StandardCI/buildTransitive/Microsoft.Build.StandardCI.props b/src/Microsoft.Build.StandardCI/buildTransitive/Microsoft.Build.StandardCI.props new file mode 100644 index 00000000..bdcdcbe9 --- /dev/null +++ b/src/Microsoft.Build.StandardCI/buildTransitive/Microsoft.Build.StandardCI.props @@ -0,0 +1,4 @@ + + + + diff --git a/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj b/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj index 8fccc83a..64eaec35 100644 --- a/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj +++ b/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj @@ -1,7 +1,7 @@  - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj index 76e1ca21..8fb9f9d0 100644 --- a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj +++ b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj @@ -1,17 +1,10 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) MSBuild tasks providing git repository information. MSBuild Tasks source control git - true - true + true @@ -25,4 +18,5 @@ + diff --git a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.nuspec b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.nuspec deleted file mode 100644 index d66e997a..00000000 --- a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.nuspec +++ /dev/null @@ -1,15 +0,0 @@ - - - - $CommonMetadataElements$ - - - $CommonFileElements$ - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props b/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props index 0f278a0b..ab81011f 100644 --- a/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props +++ b/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props @@ -1,7 +1,7 @@  - $(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Git.dll - $(MSBuildThisFileDirectory)..\tools\core\Microsoft.Build.Tasks.Git.dll + $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.Build.Tasks.Git.dll + $(MSBuildThisFileDirectory)..\tools\net\Microsoft.Build.Tasks.Git.dll diff --git a/src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.props b/src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.props new file mode 100644 index 00000000..bdcdcbe9 --- /dev/null +++ b/src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.props @@ -0,0 +1,4 @@ + + + + diff --git a/src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.targets b/src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.targets new file mode 100644 index 00000000..77e46e1b --- /dev/null +++ b/src/Microsoft.Build.Tasks.Git/buildTransitive/Microsoft.Build.Tasks.Git.targets @@ -0,0 +1,4 @@ + + + + diff --git a/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj b/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj index 0f6ef2c3..e07145b9 100644 --- a/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj +++ b/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj @@ -1,18 +1,11 @@ + - net472 - true + $(NetFrameworkToolCurrent) true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) - MSBuild tasks providing TFVC repository information. MSBuild Tasks TFVC source link - true - true + true @@ -22,4 +15,5 @@ + diff --git a/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.nuspec b/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.nuspec deleted file mode 100644 index 05353b3f..00000000 --- a/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.nuspec +++ /dev/null @@ -1,21 +0,0 @@ - - - - $CommonMetadataElements$ - - - $CommonFileElements$ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.Build.Tasks.Tfvc/build/Microsoft.Build.Tasks.Tfvc.props b/src/Microsoft.Build.Tasks.Tfvc/build/Microsoft.Build.Tasks.Tfvc.props index 863a3a53..31744df8 100644 --- a/src/Microsoft.Build.Tasks.Tfvc/build/Microsoft.Build.Tasks.Tfvc.props +++ b/src/Microsoft.Build.Tasks.Tfvc/build/Microsoft.Build.Tasks.Tfvc.props @@ -1,6 +1,6 @@  - $(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Tfvc.dll + $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.Build.Tasks.Tfvc.dll diff --git a/src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.props b/src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.props new file mode 100644 index 00000000..bdcdcbe9 --- /dev/null +++ b/src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.props @@ -0,0 +1,4 @@ + + + + diff --git a/src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.targets b/src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.targets new file mode 100644 index 00000000..77e46e1b --- /dev/null +++ b/src/Microsoft.Build.Tasks.Tfvc/buildTransitive/Microsoft.Build.Tasks.Tfvc.targets @@ -0,0 +1,4 @@ + + + + diff --git a/src/SourceLink.AzureDevOpsServer.Git.UnitTests/Microsoft.SourceLink.AzureDevOpsServer.Git.UnitTests.csproj b/src/SourceLink.AzureDevOpsServer.Git.UnitTests/Microsoft.SourceLink.AzureDevOpsServer.Git.UnitTests.csproj index 6930393c..b291969d 100644 --- a/src/SourceLink.AzureDevOpsServer.Git.UnitTests/Microsoft.SourceLink.AzureDevOpsServer.Git.UnitTests.csproj +++ b/src/SourceLink.AzureDevOpsServer.Git.UnitTests/Microsoft.SourceLink.AzureDevOpsServer.Git.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj index 5d6c260f..75a30d17 100644 --- a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj +++ b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj @@ -1,19 +1,21 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for Azure DevOps Server (formerly known as TFS) Git repositories. MSBuild Tasks Azure DepOps Server TFS Git source link - true + true + + + + + + + + diff --git a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.nuspec b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.nuspec deleted file mode 100644 index 4d680825..00000000 --- a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets b/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets index ec372220..76a2e923 100644 --- a/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets +++ b/src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets @@ -1,8 +1,8 @@  - <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureDevOpsServer.Git.dll - <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.AzureDevOpsServer.Git.dll + <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.AzureDevOpsServer.Git.dll + <_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.AzureDevOpsServer.Git.dll diff --git a/src/SourceLink.AzureRepos.Git.UnitTests/Microsoft.SourceLink.AzureRepos.Git.UnitTests.csproj b/src/SourceLink.AzureRepos.Git.UnitTests/Microsoft.SourceLink.AzureRepos.Git.UnitTests.csproj index 3c45f19f..ee716e3f 100644 --- a/src/SourceLink.AzureRepos.Git.UnitTests/Microsoft.SourceLink.AzureRepos.Git.UnitTests.csproj +++ b/src/SourceLink.AzureRepos.Git.UnitTests/Microsoft.SourceLink.AzureRepos.Git.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj index 7e68aacb..4f0e6c04 100644 --- a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj +++ b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj @@ -1,19 +1,21 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for Azure Repos (formerly known as VSTS) Git repositories. MSBuild Tasks Azure DevOps Repos VSTS Git source link - true + true + + + + + + + + diff --git a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.nuspec b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.nuspec deleted file mode 100644 index daebdb38..00000000 --- a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets b/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets index 1ba9cb80..91f9bf53 100644 --- a/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets +++ b/src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets @@ -1,8 +1,8 @@  - <_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Git.dll - <_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.AzureRepos.Git.dll + <_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.AzureRepos.Git.dll + <_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.AzureRepos.Git.dll diff --git a/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj b/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj index ebfd1896..eb62aa8f 100644 --- a/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj +++ b/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj @@ -1,23 +1,22 @@ + - net472 - true + $(NetFrameworkToolCurrent) true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) - Generates source link for Azure Repos (formerly known as VSTS) TFVC repositories. MSBuild Tasks Azure DevOps Repos VSTS TFVC source link - true + true + + + + + diff --git a/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.nuspec b/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.nuspec deleted file mode 100644 index b2f393cb..00000000 --- a/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.nuspec +++ /dev/null @@ -1,16 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - \ No newline at end of file diff --git a/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets b/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets index 488e858b..ee740fba 100644 --- a/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets +++ b/src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets @@ -1,8 +1,7 @@  - <_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Tfvc.dll - <_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.AzureRepos.Tfvc.dll + <_SourceLinkAzureReposTfvcAssemblyFile>$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.AzureRepos.Tfvc.dll diff --git a/src/SourceLink.Bitbucket.Git.UnitTests/Microsoft.SourceLink.Bitbucket.Git.UnitTests.csproj b/src/SourceLink.Bitbucket.Git.UnitTests/Microsoft.SourceLink.Bitbucket.Git.UnitTests.csproj index 37bfa6fa..99235780 100644 --- a/src/SourceLink.Bitbucket.Git.UnitTests/Microsoft.SourceLink.Bitbucket.Git.UnitTests.csproj +++ b/src/SourceLink.Bitbucket.Git.UnitTests/Microsoft.SourceLink.Bitbucket.Git.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj index 990fc770..d4829193 100644 --- a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj +++ b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj @@ -1,20 +1,22 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for Bitbucket repositories. MSBuild Tasks Bitbucket source link - true + true + + + + + + + + diff --git a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.nuspec b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.nuspec deleted file mode 100644 index bc900a19..00000000 --- a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets b/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets index 30791dfa..a3165f08 100644 --- a/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets +++ b/src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets @@ -1,8 +1,8 @@  - <_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Bitbucket.Git.dll - <_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.Bitbucket.Git.dll + <_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.Bitbucket.Git.dll + <_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.Bitbucket.Git.dll diff --git a/src/SourceLink.Common.UnitTests/Microsoft.SourceLink.Common.UnitTests.csproj b/src/SourceLink.Common.UnitTests/Microsoft.SourceLink.Common.UnitTests.csproj index 9cfd728c..14350cc4 100644 --- a/src/SourceLink.Common.UnitTests/Microsoft.SourceLink.Common.UnitTests.csproj +++ b/src/SourceLink.Common.UnitTests/Microsoft.SourceLink.Common.UnitTests.csproj @@ -1,6 +1,6 @@  - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj index 503af03b..365a80b4 100644 --- a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj +++ b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj @@ -1,17 +1,10 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) MSBuild tasks providing source control information. MSBuild Tasks source control - true - true + true @@ -24,4 +17,5 @@ + diff --git a/src/SourceLink.Common/Microsoft.SourceLink.Common.nuspec b/src/SourceLink.Common/Microsoft.SourceLink.Common.nuspec deleted file mode 100644 index 85963bb2..00000000 --- a/src/SourceLink.Common/Microsoft.SourceLink.Common.nuspec +++ /dev/null @@ -1,14 +0,0 @@ - - - - $CommonMetadataElements$ - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props b/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props index 2b84e683..c5703a59 100644 --- a/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props +++ b/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props @@ -1,10 +1,9 @@  - <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Common.dll - <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.Common.dll + <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.Common.dll + <_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.Common.dll - + + + diff --git a/src/SourceLink.Common/buildTransitive/Microsoft.SourceLink.Common.targets b/src/SourceLink.Common/buildTransitive/Microsoft.SourceLink.Common.targets new file mode 100644 index 00000000..77e46e1b --- /dev/null +++ b/src/SourceLink.Common/buildTransitive/Microsoft.SourceLink.Common.targets @@ -0,0 +1,4 @@ + + + + diff --git a/src/SourceLink.Git.IntegrationTests/Microsoft.SourceLink.Git.IntegrationTests.csproj b/src/SourceLink.Git.IntegrationTests/Microsoft.SourceLink.Git.IntegrationTests.csproj index f17a92da..c03bd7a8 100644 --- a/src/SourceLink.Git.IntegrationTests/Microsoft.SourceLink.Git.IntegrationTests.csproj +++ b/src/SourceLink.Git.IntegrationTests/Microsoft.SourceLink.Git.IntegrationTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.GitHub.UnitTests/Microsoft.SourceLink.GitHub.UnitTests.csproj b/src/SourceLink.GitHub.UnitTests/Microsoft.SourceLink.GitHub.UnitTests.csproj index 5ffb5b92..02b7a11d 100644 --- a/src/SourceLink.GitHub.UnitTests/Microsoft.SourceLink.GitHub.UnitTests.csproj +++ b/src/SourceLink.GitHub.UnitTests/Microsoft.SourceLink.GitHub.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj index 0948b1df..76b85ec0 100644 --- a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj +++ b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj @@ -1,20 +1,22 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for GitHub repositories. MSBuild Tasks GitHub source link - true + true + + + + + + + + diff --git a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.nuspec b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.nuspec deleted file mode 100644 index ed8fe9f3..00000000 --- a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets b/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets index 231a4ea5..67f8d2e9 100644 --- a/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets +++ b/src/SourceLink.GitHub/build/Microsoft.SourceLink.GitHub.targets @@ -1,8 +1,8 @@  - <_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitHub.dll - <_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.GitHub.dll + <_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.GitHub.dll + <_SourceLinkGitHubAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.GitHub.dll diff --git a/src/SourceLink.GitLab.UnitTests/Microsoft.SourceLink.GitLab.UnitTests.csproj b/src/SourceLink.GitLab.UnitTests/Microsoft.SourceLink.GitLab.UnitTests.csproj index d939220e..0dfd6337 100644 --- a/src/SourceLink.GitLab.UnitTests/Microsoft.SourceLink.GitLab.UnitTests.csproj +++ b/src/SourceLink.GitLab.UnitTests/Microsoft.SourceLink.GitLab.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj index b7ea016c..620e5a6a 100644 --- a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj +++ b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj @@ -1,19 +1,21 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for GitLab repositories. MSBuild Tasks GitLab source link - true + true + + + + + + + + diff --git a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.nuspec b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.nuspec deleted file mode 100644 index 27e937f2..00000000 --- a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets b/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets index ecf48155..27b4c4ba 100644 --- a/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets +++ b/src/SourceLink.GitLab/build/Microsoft.SourceLink.GitLab.targets @@ -1,8 +1,8 @@  - <_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitLab.dll - <_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.GitLab.dll + <_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.GitLab.dll + <_SourceLinkGitLabAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.GitLab.dll diff --git a/src/SourceLink.GitWeb.UnitTests/Microsoft.SourceLink.GitWeb.UnitTests.csproj b/src/SourceLink.GitWeb.UnitTests/Microsoft.SourceLink.GitWeb.UnitTests.csproj index 06e7b03b..bb38e214 100644 --- a/src/SourceLink.GitWeb.UnitTests/Microsoft.SourceLink.GitWeb.UnitTests.csproj +++ b/src/SourceLink.GitWeb.UnitTests/Microsoft.SourceLink.GitWeb.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj index e2dfe374..5c2becc2 100644 --- a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj +++ b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj @@ -1,20 +1,22 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for Git repositories using a GitWeb server. MSBuild Tasks GitWeb source link - true + true + + + + + + + + diff --git a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.nuspec b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.nuspec deleted file mode 100644 index 265f8361..00000000 --- a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - diff --git a/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets b/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets index 13f8d211..0babe916 100644 --- a/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets +++ b/src/SourceLink.GitWeb/build/Microsoft.SourceLink.GitWeb.targets @@ -1,8 +1,8 @@  - <_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.GitWeb.dll - <_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.GitWeb.dll + <_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.GitWeb.dll + <_SourceLinkGitWebAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.GitWeb.dll diff --git a/src/SourceLink.Gitea.UnitTests/Microsoft.SourceLink.Gitea.UnitTests.csproj b/src/SourceLink.Gitea.UnitTests/Microsoft.SourceLink.Gitea.UnitTests.csproj index 3b53bf33..a53bd2b1 100644 --- a/src/SourceLink.Gitea.UnitTests/Microsoft.SourceLink.Gitea.UnitTests.csproj +++ b/src/SourceLink.Gitea.UnitTests/Microsoft.SourceLink.Gitea.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj index 44c70588..2d71edcf 100644 --- a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj +++ b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj @@ -1,19 +1,21 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for Gitea repositories. MSBuild Tasks Gitea source link - true + true + + + + + + + + diff --git a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.nuspec b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.nuspec deleted file mode 100644 index 2019d3ca..00000000 --- a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets b/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets index dd71dd04..850b5c46 100644 --- a/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets +++ b/src/SourceLink.Gitea/build/Microsoft.SourceLink.Gitea.targets @@ -1,8 +1,8 @@  - <_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Gitea.dll - <_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.Gitea.dll + <_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.Gitea.dll + <_SourceLinkGiteaAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.Gitea.dll diff --git a/src/SourceLink.Gitee.UnitTests/Microsoft.SourceLink.Gitee.UnitTests.csproj b/src/SourceLink.Gitee.UnitTests/Microsoft.SourceLink.Gitee.UnitTests.csproj index 56fd1b43..77b36252 100644 --- a/src/SourceLink.Gitee.UnitTests/Microsoft.SourceLink.Gitee.UnitTests.csproj +++ b/src/SourceLink.Gitee.UnitTests/Microsoft.SourceLink.Gitee.UnitTests.csproj @@ -1,6 +1,6 @@ - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj index 38ae8d22..f975d794 100644 --- a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj +++ b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj @@ -1,20 +1,22 @@ - - net472;$(NetMinimum);$(NetCurrent) - true - - - true - $(MSBuildProjectName).nuspec - $(OutputPath) + + $(NetToolMinimum);$(NetFrameworkToolCurrent) Generates source link for Gitee repositories. MSBuild Tasks Gitee source link - true + true + + + + + + + + diff --git a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.nuspec b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.nuspec deleted file mode 100644 index ea8040bf..00000000 --- a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $CommonMetadataElements$ - - - - - - - $CommonFileElements$ - - - - - - - \ No newline at end of file diff --git a/src/SourceLink.Gitee/build/Microsoft.SourceLink.Gitee.targets b/src/SourceLink.Gitee/build/Microsoft.SourceLink.Gitee.targets index f5b331ce..769a1090 100644 --- a/src/SourceLink.Gitee/build/Microsoft.SourceLink.Gitee.targets +++ b/src/SourceLink.Gitee/build/Microsoft.SourceLink.Gitee.targets @@ -1,8 +1,8 @@  - <_SourceLinkGiteeAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Gitee.dll - <_SourceLinkGiteeAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.Gitee.dll + <_SourceLinkGiteeAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.SourceLink.Gitee.dll + <_SourceLinkGiteeAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net\Microsoft.SourceLink.Gitee.dll diff --git a/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj b/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj index 0550598c..a4bea88e 100644 --- a/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj +++ b/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj @@ -1,6 +1,6 @@  - net472;$(NetCurrent) + $(NetToolCurrent);$(NetFrameworkToolCurrent) diff --git a/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj b/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj index 9584bb98..6aeac342 100644 --- a/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj +++ b/src/SourceLink.Tools/Microsoft.SourceLink.Tools.Package.csproj @@ -1,19 +1,12 @@ - + - $(NetCurrent);netstandard2.0 - false - none - false - - + $(NetToolMinimum);netstandard2.0 true true Microsoft.SourceLink.Tools false - - Package containing sources of tools for reading Source Link. - - + Package containing sources of tools for reading Source Link. + $(NoWarn);NU5128 diff --git a/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs b/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs index 8ff53237..f64b8e44 100644 --- a/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs +++ b/src/TestUtilities/DotNetSdk/DotNetSdkTestBase.cs @@ -110,7 +110,7 @@ static bool isDotNetInstallDirectory(string? dir) } } - public void Dispose() + public void Dispose() => Temp.Dispose(); private const string EmptyValueMarker = "--{empty}--"; @@ -211,12 +211,12 @@ public static string EnsureTrailingDirectorySeparator(string path) => (path.LastOrDefault() == Path.DirectorySeparatorChar) ? path : path + Path.DirectorySeparatorChar; protected void VerifyValues( - string customProps, + string customProps, string customTargets, string[] targets, - string[] expressions, - string[]? expectedResults = null, - string[]? expectedErrors = null, + string[] expressions, + string[]? expectedResults = null, + string[]? expectedErrors = null, string[]? expectedWarnings = null, string? additionalCommandLineArgs = null, string buildVerbosity = "minimal", @@ -274,7 +274,7 @@ static bool diagnosticsEqual(string expected, string actual) } var outputLines = buildResult.Output.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); - + if (expectedErrors == null) { Assert.True(buildResult.ExitCode == 0, $"Build failed with exit code {buildResult.ExitCode}:{Environment.NewLine}{buildResult.Output}{Environment.NewLine}{buildResult.Errors}"); @@ -319,4 +319,4 @@ private void FixupGeneratedPropsFilePath(string generatedPropsFilePath) File.WriteAllText(generatedPropsFilePath, content, Encoding.UTF8); } } -} +} \ No newline at end of file diff --git a/src/TestUtilities/TestUtilities.csproj b/src/TestUtilities/TestUtilities.csproj index 449f612a..4e95558a 100644 --- a/src/TestUtilities/TestUtilities.csproj +++ b/src/TestUtilities/TestUtilities.csproj @@ -1,14 +1,14 @@  - net472;$(NetCurrent) - false - true + $(NetToolCurrent);$(NetFrameworkToolCurrent) false + true + diff --git a/src/dotnet-sourcelink/dotnet-sourcelink.csproj b/src/dotnet-sourcelink/dotnet-sourcelink.csproj index 4892175c..31eb2e16 100644 --- a/src/dotnet-sourcelink/dotnet-sourcelink.csproj +++ b/src/dotnet-sourcelink/dotnet-sourcelink.csproj @@ -1,7 +1,7 @@  Exe - $(NetCurrent) + $(NetToolMinimum) Major From 785b542560701312736ead88e7fe87d7257c4b75 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 2 Feb 2024 21:16:55 +0100 Subject: [PATCH 2/4] Update BuildTask.targets --- eng/BuildTask.targets | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets index a7b2a853..d7acab71 100644 --- a/eng/BuildTask.targets +++ b/eng/BuildTask.targets @@ -6,7 +6,6 @@ true true - tools true $(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackageCore;_AddBuildOutputToPackageDesktop true @@ -94,25 +93,19 @@ - + - - net - + PackagePath="tools/net/%(RecursiveDir)%(FileName)%(Extension)"/> - + - - netframework - - + - \ No newline at end of file + From 4675c0d07af7b5ee3cc53e3a5b9643f731577848 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 20 Aug 2024 16:16:16 +0200 Subject: [PATCH 3/4] Revert docs change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f9f1437..a550bdf7 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ Keep in mind that including PDBs in the .nupkg increases the size of the package - They do not support Windows PDBs (generated by VC++, or for managed projects that set build property `DebugType` to `full`) - They require the library to be built by newer C#/VB compiler (Visual Studio 2017 Update 9). -- The consumer of the package also needs Visual Studio 2022 or newer. +- The consumer of the package also needs Visual Studio 2017 Update 9 or newer. - Not supported by [Azure DevOps Artifacts](https://azure.microsoft.com/en-us/services/devops/artifacts) service. Consider including PDBs in the main package if it is not possible to use .snupkg for the above reasons. From e35d7872730dabf0c7d7c210b2d6fc597e5b35b3 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 20 Aug 2024 17:42:07 +0200 Subject: [PATCH 4/4] Fix package content for build task packages --- eng/BuildTask.targets | 1 + .../Microsoft.SourceLink.AzureDevOpsServer.Git.csproj | 4 ++-- .../Microsoft.SourceLink.AzureRepos.Git.csproj | 4 ++-- .../Microsoft.SourceLink.AzureRepos.Tfvc.csproj | 4 ++-- .../Microsoft.SourceLink.Bitbucket.Git.csproj | 4 ++-- src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj | 4 ++-- src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj | 4 ++-- src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj | 4 ++-- src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj | 4 ++-- src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj | 4 ++-- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets index d7acab71..c4a99a0c 100644 --- a/eng/BuildTask.targets +++ b/eng/BuildTask.targets @@ -74,6 +74,7 @@ true all + runtime