Skip to content

Commit

Permalink
Fixing the polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmjr committed Jan 24, 2024
1 parent 8935ec8 commit 4987426
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 29 deletions.
1 change: 0 additions & 1 deletion Samples/Dgmjr.RegexDtoGenerator.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<PackageReference Include="System.Text.Json" />

<PackageReference Include="Dgmjr.RegexDtoGenerator" IncludeAssets="Analyzers;Build" ExcludeAssets="Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime" PrivateAssets="All" />
<PackageReference Include="System.Private.CoreLib.Polyfills" IncludeAssets="ContentFiles;Build;BuildTransitive;BuildMultitargeting" ExcludeAssets="Analyzers;Runtime;Native" PrivateAssets="All" />
</ItemGroup>
<Target Name="Clean">
<RemoveDir Directories="$(BaseIntermediateOutputPath);$(IntermediateOutputPath)" />
Expand Down
26 changes: 13 additions & 13 deletions Samples/Dgmjr.RegexDtoGenerator.Samples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\..\..\..\Packages\Versions.Local.props = ..\..\..\..\Packages\Versions.Local.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dgmjr.RegexDtoGenerator.Samples", "Dgmjr.RegexDtoGenerator.Samples.csproj", "{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dgmjr.RegexDtoGenerator.Samples", "Dgmjr.RegexDtoGenerator.Samples.csproj", "{AE0D2966-6F18-49DB-828E-1D2972129C6C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -20,18 +20,18 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Local|Any CPU.ActiveCfg = Local|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Local|Any CPU.Build.0 = Local|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Testing|Any CPU.Build.0 = Testing|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Staging|Any CPU.ActiveCfg = Staging|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Staging|Any CPU.Build.0 = Staging|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Production|Any CPU.ActiveCfg = Local|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Production|Any CPU.Build.0 = Local|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E71351A-1E5D-423F-A0B9-2E0B2817C58E}.Release|Any CPU.Build.0 = Release|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Local|Any CPU.ActiveCfg = Local|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Local|Any CPU.Build.0 = Local|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Testing|Any CPU.Build.0 = Testing|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Staging|Any CPU.ActiveCfg = Staging|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Staging|Any CPU.Build.0 = Staging|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Production|Any CPU.ActiveCfg = Local|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Production|Any CPU.Build.0 = Local|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE0D2966-6F18-49DB-828E-1D2972129C6C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion src/Dgmjr.RegexDtoGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<PackageReference Include="ThisAssembly.Project" />
<PackageReference Include="System.Text.RegularExpressions.Usings" IncludeAssets="Build;BuildTransitive;BuildMultitargeting;Runtime;Compile" ExcludeAssets="ContentFiles;Native;Analyzers" PrivateAssets="None" />
<PackageReference Include="System.Usings" IncludeAssets="Build;BuildTransitive;BuildMultitargeting;Runtime;Compile" ExcludeAssets="ContentFiles;Native;Analyzers" PrivateAssets="None" />
<PackageReference Include="System.Private.CoreLib.Polyfills" IncludeAssets="ContentFiles;Build;BuildTransitive;BuildMultitargeting" ExcludeAssets="Analyzers;Runtime;Native" PrivateAssets="All" />
<!-- <PackageReference Include="System.Private.CoreLib.Polyfills" IncludeAssets="ContentFiles;Build;BuildTransitive;BuildMultitargeting" ExcludeAssets="Analyzers;Runtime;Native" PrivateAssets="All" /> -->
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Dgmjr.RegexDtoGenerator.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<ItemGroup>
<Using Include="System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" Alias="@StringSyntax" />
<!-- <Using Include="System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" Alias="@StringSyntax" /> -->
</ItemGroup>
</Project>
26 changes: 13 additions & 13 deletions src/Dgmjr.RegexDtoGenerator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\..\..\..\Packages\Versions.Local.props = ..\..\..\..\Packages\Versions.Local.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dgmjr.RegexDtoGenerator", "Dgmjr.RegexDtoGenerator.csproj", "{976286D4-51C6-471D-BF44-9E1D1DAD040D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dgmjr.RegexDtoGenerator", "Dgmjr.RegexDtoGenerator.csproj", "{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -20,18 +20,18 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Local|Any CPU.ActiveCfg = Local|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Local|Any CPU.Build.0 = Local|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Testing|Any CPU.Build.0 = Testing|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Staging|Any CPU.ActiveCfg = Staging|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Staging|Any CPU.Build.0 = Staging|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Production|Any CPU.ActiveCfg = Local|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Production|Any CPU.Build.0 = Local|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{976286D4-51C6-471D-BF44-9E1D1DAD040D}.Release|Any CPU.Build.0 = Release|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Local|Any CPU.ActiveCfg = Local|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Local|Any CPU.Build.0 = Local|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Testing|Any CPU.Build.0 = Testing|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Staging|Any CPU.ActiveCfg = Staging|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Staging|Any CPU.Build.0 = Staging|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Production|Any CPU.ActiveCfg = Local|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Production|Any CPU.Build.0 = Local|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BF0D5D0-3B7B-43D8-B08D-F0D3AA6F4D46}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
5 changes: 5 additions & 0 deletions src/Dgmjr.RegexDtoGenerator.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<ItemGroup>
<!-- <Using Include="System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" Alias="@StringSyntax" /> -->
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions src/Polyfill/IsExternalInit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#if !NET6_0_OR_GREATER
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel;

namespace System.Runtime.CompilerServices
{
/// <summary>
/// Reserved to be used by the compiler for tracking metadata. This class
/// should not be used by developers in source code.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
internal static class IsExternalInit { }
}
#endif

0 comments on commit 4987426

Please sign in to comment.