summaryrefslogtreecommitdiff
path: root/.dotnet/sdk/3.0.100-preview6-012264/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets
diff options
context:
space:
mode:
Diffstat (limited to '.dotnet/sdk/3.0.100-preview6-012264/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets')
-rw-r--r--.dotnet/sdk/3.0.100-preview6-012264/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets313
1 files changed, 313 insertions, 0 deletions
diff --git a/.dotnet/sdk/3.0.100-preview6-012264/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets b/.dotnet/sdk/3.0.100-preview6-012264/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets
new file mode 100644
index 0000000000..097b9db38c
--- /dev/null
+++ b/.dotnet/sdk/3.0.100-preview6-012264/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.TargetingPackResolution.targets
@@ -0,0 +1,313 @@
+<!--
+***********************************************************************************************
+Microsoft.NET.Sdk.TargetingPackResolution.targets
+
+WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+ created a backup copy. Incorrect changes to this file will make it
+ impossible to load or build your projects from the command-line or the IDE.
+
+Copyright (c) .NET Foundation. All rights reserved.
+***********************************************************************************************
+-->
+<Project>
+ <PropertyGroup>
+ <ResolveAssemblyReferencesDependsOn>
+ $(ResolveAssemblyReferencesDependsOn);
+ ResolveTargetingPacks;
+ </ResolveAssemblyReferencesDependsOn>
+ </PropertyGroup>
+
+ <!-- Mark the WindowsDesktop frameworks as being windows only.
+ TODO: remove this once the metadata exists on the items in the SDK props file. -->
+ <ItemGroup>
+ <KnownFrameworkReference Update="Microsoft.WindowsDesktop.App" IsWindowsOnly="True" />
+ <KnownFrameworkReference Update="Microsoft.WindowsDesktop.App.WindowsForms" IsWindowsOnly="True" />
+ <KnownFrameworkReference Update="Microsoft.WindowsDesktop.App.WPF" IsWindowsOnly="True" />
+ </ItemGroup>
+
+ <UsingTask TaskName="CheckForDuplicateFrameworkReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
+ <UsingTask TaskName="ResolveFrameworkReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
+ <UsingTask TaskName="ResolveAppHosts" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
+
+ <Target Name="ResolveFrameworkReferences" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences;CollectPackageDownloads">
+
+ <CheckForDuplicateFrameworkReferences
+ FrameworkReferences="@(FrameworkReference)"
+ MoreInformationLink="https://aka.ms/sdkimplicitrefs">
+ <Output TaskParameter="ItemsToRemove" ItemName="_FrameworkReferenceToRemove" />
+ <Output TaskParameter="ItemsToAdd" ItemName="_FrameworkReferenceToAdd" />
+ </CheckForDuplicateFrameworkReferences>
+
+ <ItemGroup>
+ <FrameworkReference Remove="@(_FrameworkReferenceToRemove)" />
+ <FrameworkReference Include="@(_FrameworkReferenceToAdd)" />
+ </ItemGroup>
+
+ <!-- We will add Microsoft.WindowsDesktop.App.WPF and Microsoft.WindowsDesktop.App.WindowsForms to the bundled versions.
+ Until we do, add them here. -->
+ <ItemGroup>
+ <_WPFKnownFrameworkReference Include="@(KnownFrameworkReference)"
+ Condition="'%(Identity)' == 'Microsoft.WindowsDesktop.App.WPF'"/>
+ </ItemGroup>
+ <ItemGroup Condition="'@(_WPFKnownFrameworkReference)' == ''">
+ <_WindowsDesktopKnownFrameworkReference Include="@(KnownFrameworkReference)"
+ Condition="'%(Identity)' == 'Microsoft.WindowsDesktop.App'"/>
+
+ <KnownFrameworkReference Include="@(_WindowsDesktopKnownFrameworkReference->'Microsoft.WindowsDesktop.App.WindowsForms')"
+ Profile="WindowsForms"/>
+ <KnownFrameworkReference Include="@(_WindowsDesktopKnownFrameworkReference->'Microsoft.WindowsDesktop.App.WPF')"
+ Profile="WPF"/>
+ </ItemGroup>
+
+ <PropertyGroup Condition="'$(EnableTargetingPackDownload)' == ''">
+ <EnableTargetingPackDownload>true</EnableTargetingPackDownload>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <_PackAsToolShimRuntimeIdentifiers Condition="@(_PackAsToolShimRuntimeIdentifiers) ==''" Include="$(PackAsToolShimRuntimeIdentifiers)"/>
+ </ItemGroup>
+
+ <ResolveFrameworkReferences FrameworkReferences="@(FrameworkReference)"
+ KnownFrameworkReferences="@(KnownFrameworkReference)"
+ TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
+ TargetFrameworkVersion="$(_TargetFrameworkVersionWithoutV)"
+ TargetingPackRoot="$(NetCoreTargetingPackRoot)"
+ RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)"
+ SelfContained="$(SelfContained)"
+ ReadyToRunEnabled="$(ReadyToRun)"
+ RuntimeIdentifier="$(RuntimeIdentifier)"
+ RuntimeIdentifiers="$(RuntimeIdentifiers)"
+ RuntimeFrameworkVersion="$(RuntimeFrameworkVersion)"
+ TargetLatestRuntimePatch="$(TargetLatestRuntimePatch)"
+ EnableTargetingPackDownload="$(EnableTargetingPackDownload)">
+
+ <Output TaskParameter="PackagesToDownload" ItemName="_PackageToDownload" />
+ <Output TaskParameter="LegacyFrameworkPackages" ItemName="_LegacyFrameworkPackage" />
+ <Output TaskParameter="RuntimeFrameworks" ItemName="RuntimeFramework" />
+ <Output TaskParameter="TargetingPacks" ItemName="TargetingPack" />
+ <Output TaskParameter="RuntimePacks" ItemName="RuntimePack" />
+ <Output TaskParameter="UnavailableRuntimePacks" ItemName="UnavailableRuntimePack" />
+
+ </ResolveFrameworkReferences>
+
+ <PropertyGroup Condition="'$(AppHostRuntimeIdentifier)' == '' And
+ ('$(UseAppHost)' == 'true' Or '$(UseComHost)' == 'true')">
+ <AppHostRuntimeIdentifier>$(RuntimeIdentifier)</AppHostRuntimeIdentifier>
+ <AppHostRuntimeIdentifier Condition="'$(AppHostRuntimeIdentifier)' == ''">$(DefaultAppHostRuntimeIdentifier)</AppHostRuntimeIdentifier>
+ </PropertyGroup>
+
+ <ResolveAppHosts TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
+ TargetFrameworkVersion="$(_TargetFrameworkVersionWithoutV)"
+ TargetingPackRoot="$(NetCoreTargetingPackRoot)"
+ AppHostRuntimeIdentifier="$(AppHostRuntimeIdentifier)"
+ OtherRuntimeIdentifiers="$(RuntimeIdentifiers)"
+ RuntimeFrameworkVersion="$(RuntimeFrameworkVersion)"
+ PackAsToolShimRuntimeIdentifiers="@(_PackAsToolShimRuntimeIdentifiers)"
+ DotNetAppHostExecutableNameWithoutExtension="$(_DotNetAppHostExecutableNameWithoutExtension)"
+ DotNetComHostLibraryNameWithoutExtension="$(_DotNetComHostLibraryNameWithoutExtension)"
+ RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)"
+ KnownAppHostPacks="@(KnownAppHostPack)">
+
+ <Output TaskParameter="PackagesToDownload" ItemName="_PackageToDownload" />
+ <Output TaskParameter="AppHost" ItemName="AppHostPack" />
+ <Output TaskParameter="ComHost" ItemName="ComHostPack" />
+ <Output TaskParameter="PackAsToolShimAppHostPacks" ItemName="PackAsToolShimAppHostPack" />
+
+ </ResolveAppHosts>
+
+ <PropertyGroup Condition="'$(UsePackageDownload)' == ''">
+ <UsePackageDownload Condition="'$(MSBuildRuntimeType)' == 'Core'">true</UsePackageDownload>
+ <UsePackageDownload Condition="'$(PackageDownloadSupported)' == 'true'">true</UsePackageDownload>
+ <UsePackageDownload Condition="'$(UsePackageDownload)' == ''">false</UsePackageDownload>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(UsePackageDownload)' == 'true'">
+ <PackageDownload Include="@(_PackageToDownload)">
+ <Version>[%(_PackageToDownload.Version)]</Version>
+ </PackageDownload>
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(UsePackageDownload)' != 'true'">
+ <PackageReference Include="@(_PackageToDownload)"
+ IsImplicitlyDefined="true"
+ PrivateAssets="all"
+ ExcludeAssets="all" />
+ </ItemGroup>
+
+ <!-- Only add these "legacy" package references if there are already existing package references,
+ as they are only needed in those scenarios (for example supplying the RID graph to
+ NuGet, or preventing older versions of Framework packages from being used). -->
+ <ItemGroup Condition="'@(PackageReference)' != '' and '$(DisableImplicitFrameworkReferences)' != 'true'">
+ <PackageReference Include="@(_LegacyFrameworkPackage)"
+ IsImplicitlyDefined="true"
+ PrivateAssets="all"
+ ExcludeAssets="all" />
+ </ItemGroup>
+
+ </Target>
+
+ <Target Name="AddTransitiveFrameworkReferences" AfterTargets="ResolvePackageAssets"
+ Condition="'@(TransitiveFrameworkReference)' != ''" >
+
+ <ItemGroup>
+ <FrameworkReference Include="@(TransitiveFrameworkReference)" Exclude="@(FrameworkReference)"/>
+ </ItemGroup>
+
+ </Target>
+
+ <UsingTask TaskName="GetPackageDirectory" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
+ <UsingTask TaskName="ResolveTargetingPackAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
+
+ <Target Name="ResolveTargetingPacks" DependsOnTargets="ResolvePackageAssets"
+ Condition="'@(TargetingPack)' != '' Or '@(FrameworkReference)' != ''">
+
+ <GetPackageDirectory
+ Items="@(TargetingPack)"
+ PackageFolders="@(AssetsFilePackageFolder)">
+
+ <Output TaskParameter="Output" ItemName="ResolvedTargetingPack" />
+
+ </GetPackageDirectory>
+
+ <ItemGroup>
+ <ResolvedTargetingPack Condition="'%(ResolvedTargetingPack.Path)' == '' and '%(ResolvedTargetingPack.PackageDirectory)' != ''">
+ <Path>%(ResolvedTargetingPack.PackageDirectory)</Path>
+ </ResolvedTargetingPack>
+
+ </ItemGroup>
+
+ <!-- For design-time builds, don't generate an error if a targeting pack isn't available (ie because it hasn't been restored yet) -->
+ <PropertyGroup Condition="'$(GenerateErrorForMissingTargetingPacks)' == ''">
+ <GenerateErrorForMissingTargetingPacks>true</GenerateErrorForMissingTargetingPacks>
+ <GenerateErrorForMissingTargetingPacks Condition="'$(DesignTimeBuild)' == 'true'">false</GenerateErrorForMissingTargetingPacks>
+ </PropertyGroup>
+
+ <ResolveTargetingPackAssets FrameworkReferences="@(FrameworkReference)"
+ ResolvedTargetingPacks="@(ResolvedTargetingPack)"
+ RuntimeFrameworks="@(RuntimeFramework)"
+ GenerateErrorForMissingTargetingPacks="$(GenerateErrorForMissingTargetingPacks)">
+ <Output TaskParameter="ReferencesToAdd" ItemName="Reference" />
+ <Output TaskParameter="PlatformManifests" ItemName="PlatformManifestsFromTargetingPacks" />
+ <Output TaskParameter="PackageConflictPreferredPackages" PropertyName="PackageConflictPreferredPackages" />
+ <Output TaskParameter="PackageConflictOverrides" ItemName="PackageConflictOverrides" />
+ <Output TaskParameter="UsedRuntimeFrameworks" ItemName="_UsedRuntimeFramework" />
+
+ </ResolveTargetingPackAssets>
+
+ <ItemGroup Condition="'$(RuntimeIdentifier)' == '' or '$(SelfContained)' != 'true'">
+ <PackageConflictPlatformManifests Include="@(PlatformManifestsFromTargetingPacks)" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <RuntimeFramework Remove="@(RuntimeFramework)" />
+ <RuntimeFramework Include="@(_UsedRuntimeFramework)" />
+ </ItemGroup>
+
+ <GetPackageDirectory
+ Items="@(AppHostPack)"
+ PackageFolders="@(AssetsFilePackageFolder)">
+
+ <Output TaskParameter="Output" ItemName="ResolvedAppHostPack" />
+
+ </GetPackageDirectory>
+
+ <GetPackageDirectory
+ Items="@(PackAsToolShimAppHostPack)"
+ PackageFolders="@(AssetsFilePackageFolder)">
+
+ <Output TaskParameter="Output" ItemName="_ApphostsForShimRuntimeIdentifiersGetPackageDirectory" />
+
+ </GetPackageDirectory>
+
+ <GetPackageDirectory
+ Items="@(ComHostPack)"
+ PackageFolders="@(AssetsFilePackageFolder)">
+
+ <Output TaskParameter="Output" ItemName="ResolvedComHostPack" />
+
+ </GetPackageDirectory>
+
+ <ItemGroup>
+ <_ApphostsForShimRuntimeIdentifiers Include="%(_ApphostsForShimRuntimeIdentifiersGetPackageDirectory.PackageDirectory)\%(_ApphostsForShimRuntimeIdentifiersGetPackageDirectory.PathInPackage)" >
+ <RuntimeIdentifier>%(_ApphostsForShimRuntimeIdentifiersGetPackageDirectory.RuntimeIdentifier)</RuntimeIdentifier>
+ </_ApphostsForShimRuntimeIdentifiers>
+ </ItemGroup>
+
+ <ItemGroup>
+ <ResolvedAppHostPack Condition="'%(ResolvedAppHostPack.Path)' == '' and '%(ResolvedAppHostPack.PackageDirectory)' != ''">
+ <Path>%(ResolvedAppHostPack.PackageDirectory)\%(ResolvedAppHostPack.PathInPackage)</Path>
+ </ResolvedAppHostPack>
+ </ItemGroup>
+
+ <PropertyGroup Condition="'@(ResolvedAppHostPack)' != '' And '$(AppHostSourcePath)' == ''">
+ <AppHostSourcePath>@(ResolvedAppHostPack->'%(Path)')</AppHostSourcePath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ResolvedComHostPack Condition="'%(ResolvedComHostPack.Path)' == '' and '%(ResolvedComHostPack.PackageDirectory)' != ''">
+ <Path>%(ResolvedComHostPack.PackageDirectory)\%(ResolvedComHostPack.PathInPackage)</Path>
+ </ResolvedComHostPack>
+ </ItemGroup>
+
+ <PropertyGroup Condition="'@(ResolvedComHostPack)' != '' And '$(ComHostSourcePath)' == ''">
+ <ComHostSourcePath>@(ResolvedComHostPack->'%(Path)')</ComHostSourcePath>
+ </PropertyGroup>
+
+ </Target>
+
+ <UsingTask TaskName="ResolveRuntimePackAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
+
+ <Target Name="ResolveRuntimePackAssets" DependsOnTargets="ResolvePackageAssets"
+ Condition="'@(RuntimePack)' != '' And '$(DesignTimeBuild)' != 'true'">
+
+ <GetPackageDirectory
+ Items="@(RuntimePack)"
+ PackageFolders="@(AssetsFilePackageFolder)">
+
+ <Output TaskParameter="Output" ItemName="ResolvedRuntimePack" />
+
+ </GetPackageDirectory>
+
+ <ResolveRuntimePackAssets FrameworkReferences="@(FrameworkReference)"
+ ResolvedRuntimePacks="@(ResolvedRuntimePack)"
+ UnavailableRuntimePacks="@(UnavailableRuntimePack)"
+ SatelliteResourceLanguages="$(SatelliteResourceLanguages)">
+ <Output TaskParameter="RuntimePackAssets" ItemName="RuntimePackAsset" />
+ </ResolveRuntimePackAssets>
+
+ <ItemGroup>
+ <ReferenceCopyLocalPaths Include="@(RuntimePackAsset)"
+ Condition="'$(CopyLocalLockFileAssemblies)' == 'true'" />
+ </ItemGroup>
+
+
+ </Target>
+
+ <!--
+ Adds metadata so the SDK will generate the UserSecretsIdAttribute.
+
+ This is associated with ASP.NET Core, but may be used in projects that don't use the Web SDK (especially test projects).
+ So it is in the base .NET SDK. (It used to be in the Microsoft.AspNetCore.App package, but now that that's a targeting
+ pack we don't support importing build logic from it directly).
+
+ If GeneratedUserSecretsAttributeFile is set, that means Microsoft.Extensions.Configuration.UserSecrets 2.1
+ or earlier was referenced as a package. This didn't use the AssemblyAttribute item group, so we cannot
+ avoid duplicate AssemblyAttribute items without skipping this target altogether..
+ -->
+ <Target Name="_GetUserSecretsAssemblyAttribute"
+ BeforeTargets="GetAssemblyAttributes"
+ Condition=" '$(UserSecretsId)' != '' AND '$(GenerateUserSecretsAttribute)' != 'false' AND '$(GeneratedUserSecretsAttributeFile)' == '' ">
+
+ <!--
+ If the Microsoft.Extensions.Configuration.UserSecrets package 2.2 or higher is referenced directly,
+ it will also add an AssemblyAttribute item. Since this attribute only allows one per assembly, do not
+ duplicate the item.
+ -->
+ <ItemGroup Condition=" @(AssemblyAttribute->WithMetadataValue('Identity', 'Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute')->Count()) == 0 ">
+ <AssemblyAttribute Include="Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute">
+ <_Parameter1>$(UserSecretsId.Trim())</_Parameter1>
+ </AssemblyAttribute>
+ </ItemGroup>
+ </Target>
+
+</Project>