forked from dotnet/msbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMSBuild.csproj
More file actions
312 lines (281 loc) · 20.9 KB
/
Copy pathMSBuild.csproj
File metadata and controls
312 lines (281 loc) · 20.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Shared\FileSystemSources.proj" />
<Import Project="..\Shared\DebuggingSources.proj" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
<PlatformTarget>$(RuntimeOutputPlatformTarget)</PlatformTarget>
<!-- MSBuild.exe needs to be architecture specific, the rest of the .dlls can be AnyCPU. -->
<PlatformTarget Condition="'$(Platform)' == 'arm64'">arm64</PlatformTarget>
<!-- MSBuild.csproj no longer uses apphost. This fixes an issue where certain tests would find
MSBuild.exe AND MSBuild.dll when they should only find MSBuild.dll. -->
<UseAppHost>false</UseAppHost>
<!-- Set RuntimeIdentifiers so that NuGet will restore for both AnyCPU as well as x86 and x64.
This is important for the MSBuild.VSSetup project, which "references" both the x86 and x64
versions of this project -->
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">win7-x86;win7-x64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<EnableDefaultItems>false</EnableDefaultItems>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>MSBuild</AssemblyName>
<RootNamespace>Microsoft.Build.CommandLine</RootNamespace>
<ApplicationIcon>MSBuild.ico</ApplicationIcon>
<LargeAddressAware>true</LargeAddressAware>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ApplicationManifest>MSBuild.exe.manifest</ApplicationManifest>
<AppConfig>app.config</AppConfig>
<!-- Temporary solution for
https://github.com/dotnet/msbuild/issues/834 Long term
two files should be generated from a single source. -->
<AppConfig Condition="'$(Platform)' == 'x64' or '$(Platform)' == 'arm64'">app.amd64.config</AppConfig>
<!-- Disable binding redirect generation: we want to be deliberate
about the redirects we expose plugins to, and we explicitly
redirect ValueTuple _down_ to match VS. -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<IsPackable>true</IsPackable>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<BuildOutputTargetFolder>contentFiles\any\</BuildOutputTargetFolder>
<PackageId>Microsoft.Build.Runtime</PackageId>
<PackageDescription>This package delivers a complete executable copy of MSBuild. Reference this package only if your application needs to load projects or execute in-process builds without requiring installation of MSBuild. Successfully evaluating projects using this package requires aggregating additional components (like the compilers) into an application directory.</PackageDescription>
<IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
<NoPackageAnalysis>true</NoPackageAnalysis>
<AddAppConfigToBuildOutputs>false</AddAppConfigToBuildOutputs>
<!-- Setting DebugType here goes hand in hand with eng\AfterSigning.targets. This is to prompt the x64 build to produce a 'full' .pdb that's `more compatible` then 'portable' and 'embedded' .pdbs. This doesn't get set on 32 bit architecture, which will default to 'embedded' and 'pdb2pdb' will convert those as needed. See https://github.com/dotnet/msbuild/pull/5070 for context. -->
<DebugType Condition="'$(Platform)' == 'x64'">full</DebugType>
<DefineConstants>$(DefineConstants);MSBUILDENTRYPOINTEXE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<AllowedReferenceRelatedFileExtensions>$(AllowedReferenceRelatedFileExtensions);.tlb</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Shared\BuildEnvironmentHelper.cs">
<Link>BuildEnvironmentHelper.cs</Link>
</Compile>
<Compile Include="..\Shared\AssemblyNameComparer.cs">
<Link>AssemblyNameComparer.cs</Link>
</Compile>
<Compile Include="..\Shared\CollectionHelpers.cs" />
<Compile Include="..\Shared\FileUtilities.cs">
<Link>FileUtilities.cs</Link>
</Compile>
<Compile Include="..\Build\Instance\ReflectableTaskPropertyInfo.cs" />
<Compile Include="..\Shared\FileUtilitiesRegex.cs">
<Link>FileUtilitiesRegex.cs</Link>
</Compile>
<Compile Include="..\Shared\QuotingUtilities.cs" />
<Compile Include="..\Shared\RegisteredTaskObjectCacheBase.cs">
<Link>RegisteredTaskObjectCacheBase.cs</Link>
</Compile>
<Compile Include="..\Shared\ResourceUtilities.cs" />
<Compile Include="..\Shared\EscapingUtilities.cs" />
<Compile Include="..\Shared\ErrorUtilities.cs" />
<Compile Include="..\Shared\Modifiers.cs" />
<Compile Include="..\Shared\XMakeElements.cs" />
<Compile Include="..\Shared\BufferedReadStream.cs" />
<Compile Include="..\Shared\CopyOnWriteDictionary.cs" />
<Compile Include="..\Shared\IKeyed.cs" />
<Compile Include="..\Shared\NamedPipeUtil.cs" />
<Compile Include="..\Shared\ReadOnlyEmptyCollection.cs" />
<Compile Include="..\Shared\ReadOnlyEmptyDictionary.cs" />
<Compile Include="..\Shared\ExceptionHandling.cs" />
<Compile Include="..\Shared\EventArgsFormatting.cs" />
<Compile Include="..\Shared\TempFileUtilities.cs">
<Link>TempFileUtilities.cs</Link>
</Compile>
<Compile Include="..\GlobalUsings.cs" Link="GlobalUsings.cs" />
<Compile Include="..\Shared\XMakeAttributes.cs" />
<Compile Include="..\Shared\INodeEndpoint.cs" />
<Compile Include="..\Shared\NodeEndpointOutOfProcBase.cs" />
<Compile Include="..\Shared\INodePacket.cs" />
<Compile Include="..\Shared\LogMessagePacketBase.cs" />
<Compile Include="..\Shared\INodePacketFactory.cs" />
<Compile Include="..\Shared\NodePacketFactory.cs" />
<Compile Include="..\Shared\INodePacketHandler.cs" />
<Compile Include="..\Shared\TranslatorHelpers.cs" />
<Compile Include="..\Shared\CommunicationsUtilities.cs" />
<Compile Include="..\Shared\InterningBinaryReader.cs" />
<Compile Include="..\Shared\TaskFactoryUtilities.cs" />
<Compile Include="..\Shared\TaskHostConfiguration.cs" />
<Compile Include="..\Shared\TaskHostTaskComplete.cs" />
<Compile Include="..\Shared\OutOfProcTaskHostTaskResult.cs" />
<Compile Include="..\Shared\TaskHostTaskCancelled.cs" />
<Compile Include="..\Shared\TaskLoader.cs" />
<Compile Include="..\Shared\MSBuildLoadContext.cs" Condition="'$(TargetFrameworkIdentifier)'!='.NETFramework'" />
<Compile Include="..\Shared\TypeLoader.cs" />
<Compile Include="..\Shared\LoadedType.cs" />
<Compile Include="..\Shared\TypeUtilities.cs" />
<Compile Include="..\Shared\AssemblyLoadInfo.cs" />
<Compile Include="..\Shared\NodeBuildComplete.cs" />
<Compile Include="..\Shared\NodeShutdown.cs" />
<Compile Include="..\Shared\TaskParameter.cs" />
<Compile Include="..\Shared\TaskParameterTypeVerifier.cs" />
<Compile Include="..\Shared\TaskEngineAssemblyResolver.cs" />
<Compile Include="..\Shared\AssemblyNameExtension.cs" />
<Compile Include="..\Shared\ThreadPoolExtensions.cs" />
<Compile Include="..\Shared\StringExtensions.cs" />
<Compile Include="..\Shared\ConversionUtilities.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="AssemblyResources.cs" />
<Compile Include="AutomaticEncodingRestorer.cs" />
<Compile Include="CommandLineSwitches.cs" />
<Compile Include="CommandLineSwitchException.cs" />
<Compile Include="..\Shared\CoreCLRAssemblyLoader.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" />
<Compile Include="DistributedLoggerRecord.cs" />
<Compile Include="InitializationException.cs" />
<Compile Include="MSBuildClientApp.cs" />
<Compile Include="NodeEndpointOutOfProcTaskHost.cs" />
<Compile Include="ProjectSchemaValidationHandler.cs" />
<Compile Include="OutOfProcTaskHostNode.cs" />
<Compile Include="OutOfProcTaskAppDomainWrapperBase.cs" />
<Compile Include="OutOfProcTaskAppDomainWrapper.cs" />
<Compile Include="PerformanceLogEventListener.cs" />
<Compile Include="JsonOutputFormatter.cs" />
<Compile Include="XMake.cs" />
<!-- This is to enable CodeMarkers in MSBuild.exe -->
<!-- Win32 RC Files -->
<RCResourceFile Include="native.rc" />
<!-- Resource Files -->
<EmbeddedResource Include="Resources\Strings.resx">
<LogicalName>$(AssemblyName).Strings.resources</LogicalName>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="..\Shared\Resources\Strings.shared.resx">
<Link>Resources\Strings.shared.resx</Link>
<LogicalName>$(AssemblyName).Strings.shared.resources</LogicalName>
<SubType>Designer</SubType>
</EmbeddedResource>
<!-- Content Files -->
<Content Include="MSBuild.ico" Pack="false" />
<Content Include="MSBuild.rsp" Pack="false">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<XsdsForVS Include="**\*.xsd" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<XsdsForVS Include="Update-MSBuildXsds.ps1" />
<None Include="@(XsdsForVS)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.BuildXL.Processes" Condition="'$(FeatureReportFileAccesses)' == 'true'" PrivateAssets="all" />
<!-- Remove the direct NETStandard.Library dependency when Microsoft.BuildXL.Processes stops bringing in netstandard1.x dependencies
or when a .NET 10 SDK is used (NuGet Package Pruning eliminates netstandard1.x dependencies). -->
<PackageReference Include="NETStandard.Library" VersionOverride="2.0.3" PrivateAssets="all" Condition="'$(FeatureReportFileAccesses)' == 'true'" />
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(FeatureMSIORedist)' == 'true'" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
</ItemGroup>
<!-- Manually download this library for RoslynCodeTaskFactory.
See target AddRefAssemblies below. -->
<ItemGroup>
<PackageDownload Include="netstandard.library">
<Version>[2.0.3]</Version>
</PackageDownload>
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- File for Assemblies we depend on -->
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<PackageReference Include="LargeAddressAware" PrivateAssets="All" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" /><!-- for consistency with Framework via transitives -->
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Build\Microsoft.Build.csproj" />
<ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" PrivateAssets="All" />
<ProjectReference Include="..\Tasks\Microsoft.Build.Tasks.csproj" />
</ItemGroup>
<!-- Xsds are not TF or arch-specific so copy once them in the outer build -->
<Target Name="CopyXsds" BeforeTargets="Build" Condition="'$(IsInnerBuild)' != 'true'">
<Copy SourceFiles="@(XsdsForVS)" DestinationFiles="@(XsdsForVS->'$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'xsd'))%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
<Target Name="AvoidValueTupleConflict" BeforeTargets="ResolveAssemblyReferences">
<ItemGroup>
<Reference Remove="@(Reference->WithMetadataValue(`NuGetPackageId`, `System.ValueTuple`))" />
</ItemGroup>
</Target>
<!-- Include MSBuild.deps.json and MSBuild.runtimeconfig.json in ContentWithTargetPath so they will be copied to the output folder of projects
that reference this one. -->
<Target Name="AddRuntimeDependenciesToContent" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" BeforeTargets="GetCopyToOutputDirectoryItems">
<ItemGroup>
<ContentWithTargetPath Include="$(ProjectDepsFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectDepsFileName)" />
<ContentWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectRuntimeConfigFileName)" />
<ContentWithTargetPath Include="$(ProjectRuntimeConfigDevFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$([System.IO.Path]::GetFileName('$(ProjectRuntimeConfigDevFilePath)'))" />
</ItemGroup>
</Target>
<!-- Redistribute core assemblies so that RoslynCodeTaskFactory can reference
them when creating assemblies at build time.
Don't add these to the Content list before RAR, because that might result
in resolving references using them instead of the correct build-time references.
Instead, add them just afterward, before assigning target paths/copying to
the bin folder. -->
<Target Name="AddRefAssemblies" DependsOnTargets="ResolveAssemblyReferences" BeforeTargets="AssignTargetPaths">
<ItemGroup>
<Content Include="$(NuGetPackageRoot)\netstandard.library\2.0.3\build\netstandard2.0\ref\netstandard.dll" Link="ref\netstandard.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(NuGetPackageRoot)\netstandard.library\2.0.3\build\netstandard2.0\ref\mscorlib.dll" Link="ref\mscorlib.dll" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>
<Target Name="GetCustomPackageFiles" BeforeTargets="_GetPackageFiles" DependsOnTargets="RemoveSatelliteDllsFromBuildOutputInPackage">
<ItemGroup>
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\MSBuild.exe.config" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Build.Framework.tlb" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' and '$(CreateTlb)' == 'true'" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Data.Entity.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.ServiceModel.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WinFx.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WorkflowBuildExtensions.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Xaml.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Workflow.Targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Workflow.VisualBasic.Targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
</ItemGroup>
<ItemGroup>
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.CrossTargeting.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.overridetasks" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.props" TargetFramework="%(_TargetFrameworks.Identity)" Subdirectory="Current\" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.tasks" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.Test.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.Before.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.After.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.CSharp.CrossTargeting.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.CSharp.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.CSharp.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NET.props" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.CurrentVersion.props" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.props" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualBasic.CrossTargeting.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualBasic.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualBasic.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\ref\**" TargetFramework="%(_TargetFrameworks.Identity)" Subdirectory="ref\" />
</ItemGroup>
<ItemGroup>
<_PackageFiles Include="@(_OurFiles)" BuildAction="Content" PackageCopyToOutput="true" PackageFlatten="false" PackagePath="contentFiles\any\%(_OurFiles.TargetFramework)\%(_OurFiles.Subdirectory)%(RecursiveDir)%(Filename)%(Extension)" />
<!-- Always include the 'standalone' NuGetSdkResolver manifest in our Runtime NuGet package. -->
<_PackageFiles Include="SdkResolvers\Standalone\Microsoft.Build.NuGetSdkResolver.xml" BuildAction="Content" PackageCopyToOutput="true" PackageFlatten="false" PackagePath="contentFiles\any\%(_BuildOutputInPackage.TargetFramework)\SdkResolvers\Microsoft.Build.NuGetSdkResolver\Microsoft.Build.NuGetSdkResolver.xml" />
<!--
The items in @(_BuildOutputInPackage) are passed to the Pack task as a separate parameter that does not accept metadata like BuildAction. So we either
need to replicate the target that gets build output or just copy the items to _PackageFiles ourselves while setting the metadata.
-->
<_PackageFiles Include="@(_BuildOutputInPackage)" BuildAction="Content" PackageCopyToOutput="true" PackageFlatten="false" PackagePath="contentFiles\any\%(_BuildOutputInPackage.TargetFramework)\%(RecursiveDir)%(Filename)%(Extension)" />
<!--
The build output was copied to _PackageFiles and must be cleared or we'll get package analysis warnings about duplicate files
-->
<_BuildOutputInPackage Remove="@(_BuildOutputInPackage)" />
<!--
Clear _TargetPathsToSymbols so that pdbs don't end up in the package
-->
<_TargetPathsToSymbols Remove="@(_TargetPathsToSymbols)" />
</ItemGroup>
</Target>
<!-- Note: Keep the `AssemblyFile=` usage here instead of using `AssemblyName`. It acts as a regression test for folks who have been using it this way,
which has been in the official docs for some time. -->
<UsingTask TaskName="ValidateMSBuildPackageDependencyVersions" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<Task>
<Code Source="ValidateMSBuildPackageDependencyVersions.cs" Language="cs" />
</Task>
</UsingTask>
<Target Name="ValidateMSBuildPackageDependencyVersions" BeforeTargets="AfterBuild" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ValidateMSBuildPackageDependencyVersions AppConfig="@(AppConfigWithTargetPath)" AssemblyPath="$(OutputPath)" />
</Target>
</Project>