Skip to content

Commit

Permalink
adding these
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmjr committed Dec 27, 2023
1 parent 1bda495 commit 61c5ab5
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Build/AssetTargetFallback.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
<NetStd1TargetFrameworks>netstandard1.6;netstandard1.5;netstandard1.3;netstandard1.0;netstandard1.0</NetStd1TargetFrameworks>
<NetStd20TargetFrameworks>netstandard2.0;$(NetStd1TargetFrameworks)</NetStd20TargetFrameworks>
<NetStd21TargetFrameworks>netstandard2.1;$(NetStd20TargetFrameworks)</NetStd21TargetFrameworks>
<NetCoreApp22TargetFrameworks>netcoreapp2.2;netcoreapp2.1;netcoreapp2.0</NetCoreApp22TargetFrameworks>
<NetCoreApp31TargetFrameworks>netcoreapp3.1;$(NetCoreApp22TargetFrameworks)</NetCoreApp31TargetFrameworks>
<Net60TargetFrameworks>net6.0;$(NetStd21TargetFrameworks)</Net60TargetFrameworks>
<Net70TargetFrameworks>net7.0;$(Net60TargetFrameworks)</Net70TargetFrameworks>
<Net80TargetFrameworks>net8.0;$(Net70TargetFrameworks)</Net80TargetFrameworks>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'net8.0'">$(Net70TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'net7.0'">n(Net60TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'net7.0'">(Net60TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'net6.0'">$(NetStd21TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'netstandard2.1'">$(NetStd20TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'netstandard2.0'">$(NetStd1TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'netstandard2.1'">$(NetStd21TargetFrameworks);$(NetCoreApp31TargetFrameworks);$(NetCoreApp22TargetFrameworks)</AssetTargetFallback>
<AssetTargetFallback Condition="'$(TargetFramework)' == 'netstandard2.0'">$(NetStd20TargetFrameworks);$(NetStd1TargetFrameworks);$(NetCoreApp22TargetFrameworks)</AssetTargetFallback>
</PropertyGroup>
</Project>
64 changes: 64 additions & 0 deletions src/Build/Custom/BeforeCentralpackageVersions.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!--
* CAustomBeforeCentralpackageVersions.targets
*
* Created: 2023-03-09-10:04:41
* Modified: 2023-03-09-10:04:41
*
* Author: David G. Moore, Jr. <[email protected]>
*
* Copyright © 2022-2023 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
-->

<Project>
<!-- Transforms <SourceGenerator /> items into <PackageReference /> items with appropriate includes/excludes -->
<ItemGroup>
<PackageReference Include="@(SourceGeneratorPackageReference)">
<CopyLocal>true</CopyLocal>
<ExcludeAssets>Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Analyzers;Build</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<SourceGenerator Remove="@(SourceGeneratorPackageReference)" />
</ItemGroup>
<!-- Transforms <SourceGeneratorProjectReference /> items into <ProjectReference /> items with appropriate properties -->
<ItemGroup>
<ProjectReference Include="@(SourceGeneratorProjectReference)">
<CopyLocal>true</CopyLocal>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
<GeneratePathProperty>true</GeneratePathProperty>
<OutputItemType>Analyzer</OutputItemType>
<Pack>true</Pack>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SetConfiguration>Configuration=$(Configuration)</SetConfiguration>
<Targets>Restore;Build;Pack</Targets>
</ProjectReference>
</ItemGroup>
<!-- Transforms <SourceCode /> items into <PackageReference /> items with appropriate includes/excludes -->
<ItemGroup>
<PackageReference Include="@(SourceCodePackageReference)">
<CopyLocal>true</CopyLocal>
<ExcludeAssets>Analyzers;Runtime;Native</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>ContentFiles;Build;BuildTransitive;BuildMultitargeting</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<SourceCode Remove="@(SourceCodePackageReference)" />
</ItemGroup>
<!-- Transforms <Usings /> items into <PackageReference /> items with appropriate includes/excludes -->
<ItemGroup>
<PackageReference Include="@(UsingsPackageReference)">
<CopyLocal>true</CopyLocal>
<ExcludeAssets>ContentFiles;Native;Analyzers</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Build;BuildTransitive;BuildMultitargeting;Runtime;Compile</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>None</PrivateAssets>
</PackageReference>
<Usings Remove="@(UsingsPackageReference)" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions src/Build/Custom/BeforeNoTargets.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<TargetFramework Condition="'$(MSBuildProjectExtension)' != '.csproj' And '$(TargetFramework)' == '' And '$(UsingNoTargetsSdk)' == 'true'">netstandard1.0</TargetFramework>
</PropertyGroup>
</Project>

0 comments on commit 61c5ab5

Please sign in to comment.