Skip to content

Commit

Permalink
Merge pull request #53 from jaredpar/net9
Browse files Browse the repository at this point in the history
net9.0 preview3 support
  • Loading branch information
jaredpar authored May 7, 2024
2 parents faf7360 + 5de223a commit 08669d3
Show file tree
Hide file tree
Showing 7 changed files with 5,709 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.3.24172.9" IncludeAssets="none" PrivateAssets="all" GeneratePathProperty="true" ExcludeAssets="analyzers" />
</ItemGroup>

<Import Project="Generated.targets" />
</Project>

5,000 changes: 5,000 additions & 0 deletions Basic.Reference.Assemblies.Net90/Generated.cs

Large diffs are not rendered by default.

656 changes: 656 additions & 0 deletions Basic.Reference.Assemblies.Net90/Generated.targets

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<ProjectReference Include="..\Basic.Reference.Assemblies.Net60\Basic.Reference.Assemblies.Net60.csproj" />
<ProjectReference Include="..\Basic.Reference.Assemblies.Net70\Basic.Reference.Assemblies.Net70.csproj" />
<ProjectReference Include="..\Basic.Reference.Assemblies.Net80\Basic.Reference.Assemblies.Net80.csproj" />
<ProjectReference Include="..\Basic.Reference.Assemblies.Net90\Basic.Reference.Assemblies.Net90.csproj" />
<ProjectReference Include="..\Basic.Reference.Assemblies.AspNet80\Basic.Reference.Assemblies.AspNet80.csproj" />
<ProjectReference Include="..\Basic.Reference.Assemblies.NetCoreApp31\Basic.Reference.Assemblies.NetCoreApp31.csproj" />
<ProjectReference Include="..\Basic.Reference.Assemblies.NetStandard13\Basic.Reference.Assemblies.NetStandard13.csproj" />
Expand Down
2 changes: 2 additions & 0 deletions Basic.Reference.Assemblies.UnitTests/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static IEnumerable<object[]> ApplicationReferences
new object[] { "netstandard2.0", CombinedAssembly.NetStandard20.References.All },
new object[] { "net8.0", CombinedAssembly.Net80.References.All },
new object[] { "net8.0", AspNet80.References.All },
new object[] { "net9.0", Net90.References.All },
};
}
}
Expand Down Expand Up @@ -65,6 +66,7 @@ public static IEnumerable<object[]> AllValues
new object[] { "net8.0", Net80.ReferenceInfos.AllValues },
new object[] { "net8.0", Net80.ReferenceInfos.AllValues },
new object[] { "net8.0", Net80.ReferenceInfos.AllValues },
new object[] { "net9.0", Net90.ReferenceInfos.AllValues },

new object[] { "netstandard2.0", CombinedAssembly.NetStandard20.ReferenceInfos.AllValues },
new object[] { "net472", CombinedAssembly.Net472.ReferenceInfos.AllValues },
Expand Down
14 changes: 14 additions & 0 deletions Basic.Reference.Assemblies.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic.Reference.Assemblies.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generate", "Generate\Generate.csproj", "{597AECC8-C644-4E8B-A429-B1F8CA015C90}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic.Reference.Assemblies.Net90", "Basic.Reference.Assemblies.Net90\Basic.Reference.Assemblies.Net90.csproj", "{996A3527-7150-4785-940A-181B49EFFB80}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -209,6 +211,18 @@ Global
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x64.Build.0 = Release|Any CPU
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x86.ActiveCfg = Release|Any CPU
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x86.Build.0 = Release|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x64.ActiveCfg = Debug|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x64.Build.0 = Debug|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x86.ActiveCfg = Debug|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x86.Build.0 = Debug|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Release|Any CPU.Build.0 = Release|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x64.ActiveCfg = Release|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x64.Build.0 = Release|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x86.ActiveCfg = Release|Any CPU
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
35 changes: 22 additions & 13 deletions Generate/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Net60Windows();
Net70();
Net80();
Net90();
AspNet80();
NetStandard13();
NetStandard20();
Expand All @@ -26,58 +27,66 @@ void NetCoreApp31()
var content = GetGeneratedContent("NetCoreApp31", [@"microsoft.netcore.app.ref\3.1.0\ref\netcoreapp3.1"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.NetCoreApp31");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void Net50()
{
var content = GetGeneratedContent("Net50", [@"microsoft.netcore.app.ref\5.0.0\ref\net5.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net50");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void Net60()
{
var content = GetGeneratedContent("Net60", [@"microsoft.netcore.app.ref\6.0.27\ref\net6.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net60");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void Net60Windows()
{
var content = GetGeneratedContent("Net60Windows", [@"microsoft.windowsdesktop.app.ref\6.0.27\ref\net6.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net60Windows");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void Net70()
{
var content = GetGeneratedContent("Net70", [@"microsoft.netcore.app.ref\7.0.16\ref\net7.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net70");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void Net80()
{
var content = GetGeneratedContent("Net80", [@"microsoft.netcore.app.ref\8.0.3\ref\net8.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net80");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);

File.WriteAllText(Path.Combine(combinedDir, "Generated.Net80.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net80.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net80.targets"), content.TargetsContent, encoding);
}

void Net90()
{
var content = GetGeneratedContent("Net90", [@"microsoft.netcore.app.ref\9.0.0-preview.3.24172.9\ref\net9.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net90");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void AspNet80()
{
var content = GetGeneratedContent("AspNet80", [@"microsoft.netcore.app.ref\8.0.3\ref\net8.0", @"microsoft.aspnetcore.app.ref\8.0.3\ref\net8.0"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.AspNet80");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void NetStandard13()
Expand All @@ -88,33 +97,33 @@ void NetStandard13()
var content = GetGeneratedContentCore("NetStandard13", [realPackagePath], workspacePath, @"$(MSBuildThisFileDirectory)..", excludePattern: null);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.NetStandard13");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void NetStandard20()
{
var content = GetGeneratedContent("NetStandard20", [@"netstandard.library\2.0.3\build\netstandard2.0\ref"]);
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.NetStandard20");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.NetStandard20.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.NetStandard20.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.NetStandard20.targets"), content.TargetsContent, encoding);
}

void Net461()
{
var content = GetGeneratedContent("Net461", [@"microsoft.netframework.referenceassemblies.net461\1.0.3\build\.NETFramework\v4.6.1"], new Regex(@"System\.Enterprise.*"));
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net461");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
}

void Net472()
{
var content = GetGeneratedContent("Net472", [@"microsoft.netframework.referenceassemblies.net472\1.0.3\build\.NETFramework\v4.7.2"], new Regex(@"System\.Enterprise.*"));
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net472");
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net472.cs"), content.CodeContent, encoding);
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net472.targets"), content.TargetsContent, encoding);
}
Expand Down

0 comments on commit 08669d3

Please sign in to comment.