Skip to content

Commit 3539d92

Browse files
authored
Target netcoreapp3.1 (#767)
1 parent 5a04f83 commit 3539d92

File tree

35 files changed

+109
-93
lines changed

35 files changed

+109
-93
lines changed

eng/BuildTask.targets

-21
This file was deleted.

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<PropertyGroup>
55
<!-- This repo version -->
6-
<VersionPrefix>1.1.0</VersionPrefix>
6+
<VersionPrefix>1.1.1</VersionPrefix>
77
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
88
<SemanticVersioningV1>true</SemanticVersioningV1>
99
<!-- Opt-in repo features -->

src/Directory.Build.targets

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
<Project>
44
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
55

6+
<ItemGroup>
7+
<NuspecProperty Include="DesktopTfm=net472"/>
8+
<NuspecProperty Include="CoreTfm=net6.0" Condition="'$(DotNetBuildFromSource)' == 'true'"/>
9+
<NuspecProperty Include="CoreTfm=netcoreapp3.1" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
10+
</ItemGroup>
11+
612
<!--
713
Workaround for https://github.com/NuGet/Home/issues/6754: cyclic dependency.
814
-->

src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
66
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
77
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
88
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>

src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj

+10-12
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

9-
<!-- NuGet -->
9+
<!-- NuGet: Using an explicit nuspec file to customize TFM directory -->
10+
<IsPackable>true</IsPackable>
11+
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
12+
<NuspecBasePath>$(OutputPath)</NuspecBasePath>
13+
1014
<PackageDescription>MSBuild tasks providing git repository information.</PackageDescription>
1115
<PackageTags>MSBuild Tasks source control git</PackageTags>
1216
<DevelopmentDependency>true</DevelopmentDependency>
1317
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
14-
15-
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_GetTfmSpecificFilesToPackage</TargetsForTfmSpecificContentInPackage>
1618
</PropertyGroup>
19+
<ItemGroup>
20+
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" PrivateAssets="all" />
21+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCore)" PrivateAssets="all" />
22+
</ItemGroup>
1723
<ItemGroup>
1824
<Compile Include="..\Common\NullableAttributes.cs" Link="Common\NullableAttributes.cs" />
1925
<Compile Include="..\Common\Names.cs" Link="Common\Names.cs" />
@@ -26,12 +32,4 @@
2632
<InternalsVisibleTo Include="Microsoft.Build.Tasks.Git.UnitTests" />
2733
<InternalsVisibleTo Include="Microsoft.SourceLink.Git.IntegrationTests" />
2834
</ItemGroup>
29-
30-
<Target Name="_GetTfmSpecificFilesToPackage" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
31-
<ItemGroup>
32-
<TfmSpecificPackageFile Include="$(TargetDir)System.Collections.Immutable.dll" PackagePath="tools/$(TargetFramework)"/>
33-
</ItemGroup>
34-
</Target>
35-
36-
<Import Project="$(RepositoryEngineeringDir)BuildTask.targets"/>
3735
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
$CommonMetadataElements$
5+
</metadata>
6+
<files>
7+
$CommonFileElements$
8+
<file src="$DesktopTfm$*\**\Microsoft.Build.Tasks.Git.*" exclude="**\*.config" target="tools" />
9+
<file src="$DesktopTfm$*\System.Collections.Immutable.dll" target="tools\net472" />
10+
<file src="$CoreTfm$\**\Microsoft.Build.Tasks.Git.*" target="tools\core" />
11+
12+
<file src="$ProjectDirectory$\build\*.*" target="build" />
13+
<file src="$ProjectDirectory$\buildMultiTargeting\*.*" target="buildMultiTargeting" />
14+
</files>
15+
</package>

src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<Project>
44
<PropertyGroup>
55
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
6-
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
6+
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile>
77
</PropertyGroup>
88
</Project>

src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj

+9-18
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@
77
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
88
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
99

10-
<!-- Using an explicit nuspec file since NuGet Pack target currently doesn't support including dependencies in tools packages -->
10+
<!-- NuGet: Using an explicit nuspec file to customize TFM directory -->
11+
<IsPackable>true</IsPackable>
12+
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
13+
<NuspecBasePath>$(OutputPath)</NuspecBasePath>
14+
1115
<PackageDescription>MSBuild tasks providing TFVC repository information.</PackageDescription>
1216
<PackageTags>MSBuild Tasks TFVC source link</PackageTags>
1317
<DevelopmentDependency>true</DevelopmentDependency>
1418
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
15-
16-
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_GetTfmSpecificFilesToPackage</TargetsForTfmSpecificContentInPackage>
1719
</PropertyGroup>
20+
<ItemGroup>
21+
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" PrivateAssets="all" />
22+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCore)" PrivateAssets="all" />
23+
</ItemGroup>
1824
<ItemGroup>
1925
<Compile Include="..\Common\NullableAttributes.cs" Link="Common\NullableAttributes.cs" />
2026
<Compile Include="..\Common\PathUtilities.cs" Link="Common\PathUtilities.cs" />
@@ -25,19 +31,4 @@
2531
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCore)" />
2632
<PackageReference Include="Microsoft.TeamFoundationServer.ExtendedClient" Version="$(MicrosoftTeamFoundationServerExtendedClientVersion)" />
2733
</ItemGroup>
28-
29-
<Target Name="_GetTfmSpecificFilesToPackage">
30-
<ItemGroup>
31-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.TeamFoundation.Client.dll" PackagePath="tools\$(TargetFramework)" />
32-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.TeamFoundation.Common.dll" PackagePath="tools\$(TargetFramework)" />
33-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.TeamFoundation.Core.WebApi.dll" PackagePath="tools\$(TargetFramework)" />
34-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.TeamFoundation.VersionControl.Client.dll" PackagePath="tools\$(TargetFramework)" />
35-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.TeamFoundation.VersionControl.Common.dll" PackagePath="tools\$(TargetFramework)" />
36-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.VisualStudio.Services.Client.Interactive.dll" PackagePath="tools\$(TargetFramework)" />
37-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.VisualStudio.Services.Common.dll" PackagePath="tools\$(TargetFramework)" />
38-
<TfmSpecificPackageFile Include="$(TargetDir)Microsoft.VisualStudio.Services.WebApi.dll" PackagePath="tools\$(TargetFramework)" />
39-
</ItemGroup>
40-
</Target>
41-
42-
<Import Project="$(RepositoryEngineeringDir)BuildTask.targets" />
4334
</Project>

src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.nuspec

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
$CommonMetadataElements$
55
</metadata>
66
<files>
7-
$CommonMetadataFiles$
8-
<file src="net461\Microsoft.Build.Tasks.Tfvc.*" target="tools\net461" />
9-
<file src="net461\Microsoft.TeamFoundation.Client.dll" target="tools\net461" />
10-
<file src="net461\Microsoft.TeamFoundation.Common.dll" target="tools\net461" />
11-
<file src="net461\Microsoft.TeamFoundation.Core.WebApi.dll" target="tools\net461" />
12-
<file src="net461\Microsoft.TeamFoundation.VersionControl.Client.dll" target="tools\net461" />
13-
<file src="net461\Microsoft.TeamFoundation.VersionControl.Common.dll" target="tools\net461" />
14-
<file src="net461\Microsoft.VisualStudio.Services.Client.Interactive.dll" target="tools\net461" />
15-
<file src="net461\Microsoft.VisualStudio.Services.Common.dll" target="tools\net46" />
16-
<file src="net461\Microsoft.VisualStudio.Services.WebApi.dll" target="tools\net46" />
7+
$CommonFileElements$
8+
<file src="$DesktopTfm$*\**\Microsoft.Build.Tasks.Tfvc.*" exclude="**\*.config" target="tools" />
9+
<file src="$DesktopTfm$*\**\Microsoft.TeamFoundation.Client.*" target="tools" />
10+
<file src="$DesktopTfm$*\**\Microsoft.TeamFoundation.Common.*" target="tools" />
11+
<file src="$DesktopTfm$*\**\Microsoft.TeamFoundation.Core.WebApi.*" target="tools" />
12+
<file src="$DesktopTfm$*\**\Microsoft.TeamFoundation.VersionControl.Client.*" target="tools" />
13+
<file src="$DesktopTfm$*\**\Microsoft.TeamFoundation.VersionControl.Common.*" target="tools" />
14+
<file src="$DesktopTfm$*\**\Microsoft.VisualStudio.Services.Client.Interactive.*" target="tools" />
15+
<file src="$DesktopTfm$*\**\Microsoft.VisualStudio.Services.Common.*" target="tools" />
16+
<file src="$DesktopTfm$*\**\Microsoft.VisualStudio.Services.WebApi.*" target="tools" />
1717

1818
<file src="$ProjectDirectory$\build\*.*" target="build" />
1919
<file src="$ProjectDirectory$\build\*.*" target="buildMultiTargeting" />

src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.nuspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
</metadata>
1010
<files>
1111
$CommonFileElements$
12-
<file src="**\Microsoft.SourceLink.AzureDevOpsServer.Git.*" target="tools" />
12+
<file src="$DesktopTfm$*\**\Microsoft.SourceLink.AzureDevOpsServer.Git.*" exclude="**\*.config" target="tools" />
13+
<file src="$CoreTfm$\**\Microsoft.SourceLink.AzureDevOpsServer.Git.*" target="tools\core" />
1314

1415
<file src="$ProjectDirectory$\build\*.*" target="build" />
1516
<file src="$ProjectDirectory$\buildMultiTargeting\*.*" target="buildMultiTargeting" />

src/SourceLink.AzureDevOpsServer.Git/build/Microsoft.SourceLink.AzureDevOpsServer.Git.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<PropertyGroup>
55
<_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureDevOpsServer.Git.dll</_SourceLinkAzureDevOpsServerGitAssemblyFile>
6-
<_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureDevOpsServer.Git.dll</_SourceLinkAzureDevOpsServerGitAssemblyFile>
6+
<_SourceLinkAzureDevOpsServerGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.AzureDevOpsServer.Git.dll</_SourceLinkAzureDevOpsServerGitAssemblyFile>
77
</PropertyGroup>
88

99
<UsingTask TaskName="Microsoft.SourceLink.AzureDevOpsServer.Git.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkAzureDevOpsServerGitAssemblyFile)"/>

src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.nuspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
</metadata>
1010
<files>
1111
$CommonFileElements$
12-
<file src="**\Microsoft.SourceLink.AzureRepos.Git.*" target="tools" />
12+
<file src="$DesktopTfm$*\**\Microsoft.SourceLink.AzureRepos.Git.*" exclude="**\*.config" target="tools" />
13+
<file src="$CoreTfm$\**\Microsoft.SourceLink.AzureRepos.Git.*" target="tools\core" />
1314

1415
<file src="$ProjectDirectory$\build\*.*" target="build" />
1516
<file src="$ProjectDirectory$\buildMultiTargeting\*.*" target="buildMultiTargeting" />

src/SourceLink.AzureRepos.Git/build/Microsoft.SourceLink.AzureRepos.Git.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<PropertyGroup>
55
<_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Git.dll</_SourceLinkAzureReposGitAssemblyFile>
6-
<_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureRepos.Git.dll</_SourceLinkAzureReposGitAssemblyFile>
6+
<_SourceLinkAzureReposGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.AzureRepos.Git.dll</_SourceLinkAzureReposGitAssemblyFile>
77
</PropertyGroup>
88

99
<UsingTask TaskName="Microsoft.SourceLink.AzureRepos.Git.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkAzureReposGitAssemblyFile)"/>

src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</metadata>
1010
<files>
1111
$CommonFileElements$
12-
<file src="**\Microsoft.SourceLink.AzureRepos.Tfvc.*" target="tools" />
12+
<file src="$DesktopTfm$*\**\Microsoft.SourceLink.AzureRepos.Tfvc.*" exclude="**\*.config" target="tools" />
1313

1414
<file src="$ProjectDirectory$\build\*.*" target="build" />
1515
</files>

src/SourceLink.AzureRepos.Tfvc/build/Microsoft.SourceLink.AzureRepos.Tfvc.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<PropertyGroup>
55
<_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.AzureRepos.Tfvc.dll</_SourceLinkAzureReposTfvcAssemblyFile>
6-
<_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.AzureRepos.Tfvc.dll</_SourceLinkAzureReposTfvcAssemblyFile>
6+
<_SourceLinkAzureReposTfvcAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.AzureRepos.Tfvc.dll</_SourceLinkAzureReposTfvcAssemblyFile>
77
</PropertyGroup>
88

99
<UsingTask TaskName="Microsoft.SourceLink.AzureRepos.Tfvc.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkAzureReposTfvcAssemblyFile)"/>

src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.nuspec

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
</metadata>
1010
<files>
1111
$CommonFileElements$
12-
<file src="**\Microsoft.SourceLink.BitBucket.Git.*" target="tools" />
13-
12+
<file src="$DesktopTfm$*\**\Microsoft.SourceLink.BitBucket.Git.*" exclude="**\*.config" target="tools" />
13+
<file src="$CoreTfm$\**\Microsoft.SourceLink.BitBucket.Git.*" target="tools\core" />
14+
1415
<file src="$ProjectDirectory$\build\*.*" target="build" />
1516
<file src="$ProjectDirectory$\buildMultiTargeting\*.*" target="buildMultiTargeting" />
1617
</files>

src/SourceLink.Bitbucket.Git/build/Microsoft.SourceLink.Bitbucket.Git.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Project>
44
<PropertyGroup>
55
<_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Bitbucket.Git.dll</_SourceLinkBitbucketAssemblyFile>
6-
<_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net6.0\Microsoft.SourceLink.Bitbucket.Git.dll</_SourceLinkBitbucketAssemblyFile>
6+
<_SourceLinkBitbucketAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.Bitbucket.Git.dll</_SourceLinkBitbucketAssemblyFile>
77
</PropertyGroup>
88

99
<UsingTask TaskName="Microsoft.SourceLink.Bitbucket.Git.GetSourceLinkUrl" AssemblyFile="$(_SourceLinkBitbucketAssemblyFile)"/>

src/SourceLink.Common/Microsoft.SourceLink.Common.csproj

+10-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">net6.0</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

9-
<!-- NuGet -->
9+
<!-- NuGet: Using an explicit nuspec file to customize TFM directory -->
10+
<IsPackable>true</IsPackable>
11+
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
12+
<NuspecBasePath>$(OutputPath)</NuspecBasePath>
13+
1014
<PackageDescription>MSBuild tasks providing source control information.</PackageDescription>
1115
<PackageTags>MSBuild Tasks source control</PackageTags>
1216
<DevelopmentDependency>true</DevelopmentDependency>
1317
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
1418
</PropertyGroup>
19+
<ItemGroup>
20+
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" PrivateAssets="all" />
21+
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCore)" PrivateAssets="all" />
22+
</ItemGroup>
1523
<ItemGroup>
1624
<Compile Include="..\Common\NullableAttributes.cs" Link="Common\NullableAttributes.cs" />
1725
<Compile Include="..\Common\Names.cs" Link="Common\Names.cs" />
@@ -21,6 +29,4 @@
2129
<InternalsVisibleTo Include="Microsoft.SourceLink.Common.UnitTests" />
2230
<InternalsVisibleTo Include="Microsoft.SourceLink.Git.IntegrationTests" />
2331
</ItemGroup>
24-
25-
<Import Project="$(RepositoryEngineeringDir)BuildTask.targets" />
2632
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
$CommonMetadataElements$
5+
</metadata>
6+
<files>
7+
$CommonFileElements$
8+
<file src="$DesktopTfm$*\**\Microsoft.SourceLink.Common.*" exclude="**\*.config" target="tools" />
9+
<file src="$CoreTfm$\**\Microsoft.SourceLink.Common.*" target="tools\core" />
10+
11+
<file src="$ProjectDirectory$\build\*.*" target="build" />
12+
<file src="$ProjectDirectory$\buildMultiTargeting\*.*" target="buildMultiTargeting" />
13+
</files>
14+
</package>

0 commit comments

Comments
 (0)