|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | | - <TargetFrameworks>$(NetCurrent);$(NetFrameworkToolCurrent)</TargetFrameworks> |
| 4 | + <TargetFrameworks>$(NetMinimum);$(NetFrameworkToolCurrent)</TargetFrameworks> |
5 | 5 | <Description>MSBuild tasks for Entity Framework Core projects.</Description> |
6 | 6 | <AssemblyName>Microsoft.EntityFrameworkCore.Tasks</AssemblyName> |
7 | 7 | <RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace> |
|
11 | 11 | <ImplicitUsings>true</ImplicitUsings> |
12 | 12 | <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\..\rulesets\EFCore.noxmldocs.ruleset</CodeAnalysisRuleSet> |
13 | 13 | <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddPackContent</TargetsForTfmSpecificContentInPackage> |
14 | | - <BuildOutputTargetFolder>tasks</BuildOutputTargetFolder> |
| 14 | + <IncludeBuildOutput>false</IncludeBuildOutput> |
15 | 15 | </PropertyGroup> |
16 | 16 |
|
17 | 17 | <PropertyGroup Condition="'$(TargetFramework)' == '$(NetFrameworkToolCurrent)'"> |
|
71 | 71 | </ItemGroup> |
72 | 72 |
|
73 | 73 | <Target Name="AddPackContent"> |
74 | | - <ItemGroup Condition="'$(TargetFramework)' == '$(NetCurrent)'"> |
75 | | - <TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(NetMinimum)/*" PackagePath="tools/$(NetCurrent)" /> |
76 | | - <TfmSpecificPackageFile Include="$(OutputPath)$(AssemblyName).deps.json" PackagePath="tasks/$(TargetFramework)" /> |
| 74 | + <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'"> |
| 75 | + <TfmSpecificPackageFile Include="$(TargetPath)" PackagePath="tasks/net" /> |
| 76 | + <TfmSpecificPackageFile Include="$(TargetDir)$(TargetName).pdb" PackagePath="tasks/net" /> |
| 77 | + <TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(NetMinimum)/*" PackagePath="tools/net" /> |
| 78 | + <TfmSpecificPackageFile Include="$(OutputPath)$(AssemblyName).deps.json" PackagePath="tasks/net" /> |
77 | 79 | </ItemGroup> |
78 | 80 |
|
79 | | - <ItemGroup Condition="'$(TargetFramework)' == '$(NetFrameworkToolCurrent)'"> |
80 | | - <TfmSpecificPackageFile Include="$(OutputPath)*" Exclude="$(TargetPath);$(TargetDir)$(TargetName).pdb" PackagePath="tasks/$(TargetFramework)" /> |
| 81 | + <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> |
| 82 | + <TfmSpecificPackageFile Include="$(OutputPath)*" PackagePath="tasks/netframework" /> |
81 | 83 | </ItemGroup> |
82 | 84 |
|
83 | 85 | <ItemGroup> |
84 | 86 | <TfmSpecificDebugSymbolsFile Include="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))" |
85 | 87 | TargetPath="/%(TfmSpecificPackageFile.PackagePath)/%(Filename)%(Extension)" |
86 | 88 | TargetFramework="$(TargetFramework)" |
87 | 89 | Condition="'$(IncludeSymbols)' == 'true'" /> |
88 | | - <!-- Remove symbols from the non symbol package. --> |
89 | | - <TfmSpecificPackageFile Remove="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))" /> |
| 90 | + <!-- |
| 91 | + The NuGet SDK only collects TfmSpecificDebugSymbolsFile when IncludeBuildOutput is true, but this |
| 92 | + project sets IncludeBuildOutput=false. So as a workaround, we include PDBs in both packages. |
| 93 | + --> |
| 94 | + <!-- <TfmSpecificPackageFile Remove="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))" /> --> |
90 | 95 | </ItemGroup> |
91 | 96 | </Target> |
92 | 97 |
|
|
0 commit comments