Skip to content

Commit 08669d3

Browse files
authored
Merge pull request #53 from jaredpar/net9
net9.0 preview3 support
2 parents faf7360 + 5de223a commit 08669d3

File tree

7 files changed

+5709
-13
lines changed

7 files changed

+5709
-13
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<IsPackable>true</IsPackable>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.3.24172.9" IncludeAssets="none" PrivateAssets="all" GeneratePathProperty="true" ExcludeAssets="analyzers" />
10+
</ItemGroup>
11+
12+
<Import Project="Generated.targets" />
13+
</Project>
14+

Basic.Reference.Assemblies.Net90/Generated.cs

Lines changed: 5000 additions & 0 deletions
Large diffs are not rendered by default.

Basic.Reference.Assemblies.Net90/Generated.targets

Lines changed: 656 additions & 0 deletions
Large diffs are not rendered by default.

Basic.Reference.Assemblies.UnitTests/Basic.Reference.Assemblies.UnitTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<ProjectReference Include="..\Basic.Reference.Assemblies.Net60\Basic.Reference.Assemblies.Net60.csproj" />
2121
<ProjectReference Include="..\Basic.Reference.Assemblies.Net70\Basic.Reference.Assemblies.Net70.csproj" />
2222
<ProjectReference Include="..\Basic.Reference.Assemblies.Net80\Basic.Reference.Assemblies.Net80.csproj" />
23+
<ProjectReference Include="..\Basic.Reference.Assemblies.Net90\Basic.Reference.Assemblies.Net90.csproj" />
2324
<ProjectReference Include="..\Basic.Reference.Assemblies.AspNet80\Basic.Reference.Assemblies.AspNet80.csproj" />
2425
<ProjectReference Include="..\Basic.Reference.Assemblies.NetCoreApp31\Basic.Reference.Assemblies.NetCoreApp31.csproj" />
2526
<ProjectReference Include="..\Basic.Reference.Assemblies.NetStandard13\Basic.Reference.Assemblies.NetStandard13.csproj" />

Basic.Reference.Assemblies.UnitTests/TestData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static IEnumerable<object[]> ApplicationReferences
2525
new object[] { "netstandard2.0", CombinedAssembly.NetStandard20.References.All },
2626
new object[] { "net8.0", CombinedAssembly.Net80.References.All },
2727
new object[] { "net8.0", AspNet80.References.All },
28+
new object[] { "net9.0", Net90.References.All },
2829
};
2930
}
3031
}
@@ -65,6 +66,7 @@ public static IEnumerable<object[]> AllValues
6566
new object[] { "net8.0", Net80.ReferenceInfos.AllValues },
6667
new object[] { "net8.0", Net80.ReferenceInfos.AllValues },
6768
new object[] { "net8.0", Net80.ReferenceInfos.AllValues },
69+
new object[] { "net9.0", Net90.ReferenceInfos.AllValues },
6870

6971
new object[] { "netstandard2.0", CombinedAssembly.NetStandard20.ReferenceInfos.AllValues },
7072
new object[] { "net472", CombinedAssembly.Net472.ReferenceInfos.AllValues },

Basic.Reference.Assemblies.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic.Reference.Assemblies.
3131
EndProject
3232
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generate", "Generate\Generate.csproj", "{597AECC8-C644-4E8B-A429-B1F8CA015C90}"
3333
EndProject
34+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic.Reference.Assemblies.Net90", "Basic.Reference.Assemblies.Net90\Basic.Reference.Assemblies.Net90.csproj", "{996A3527-7150-4785-940A-181B49EFFB80}"
35+
EndProject
3436
Global
3537
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3638
Debug|Any CPU = Debug|Any CPU
@@ -209,6 +211,18 @@ Global
209211
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x64.Build.0 = Release|Any CPU
210212
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x86.ActiveCfg = Release|Any CPU
211213
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x86.Build.0 = Release|Any CPU
214+
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
215+
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|Any CPU.Build.0 = Debug|Any CPU
216+
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x64.ActiveCfg = Debug|Any CPU
217+
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x64.Build.0 = Debug|Any CPU
218+
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x86.ActiveCfg = Debug|Any CPU
219+
{996A3527-7150-4785-940A-181B49EFFB80}.Debug|x86.Build.0 = Debug|Any CPU
220+
{996A3527-7150-4785-940A-181B49EFFB80}.Release|Any CPU.ActiveCfg = Release|Any CPU
221+
{996A3527-7150-4785-940A-181B49EFFB80}.Release|Any CPU.Build.0 = Release|Any CPU
222+
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x64.ActiveCfg = Release|Any CPU
223+
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x64.Build.0 = Release|Any CPU
224+
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x86.ActiveCfg = Release|Any CPU
225+
{996A3527-7150-4785-940A-181B49EFFB80}.Release|x86.Build.0 = Release|Any CPU
212226
EndGlobalSection
213227
GlobalSection(SolutionProperties) = preSolution
214228
HideSolutionNode = FALSE

Generate/Program.cs

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
Net60Windows();
1515
Net70();
1616
Net80();
17+
Net90();
1718
AspNet80();
1819
NetStandard13();
1920
NetStandard20();
@@ -26,58 +27,66 @@ void NetCoreApp31()
2627
var content = GetGeneratedContent("NetCoreApp31", [@"microsoft.netcore.app.ref\3.1.0\ref\netcoreapp3.1"]);
2728
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.NetCoreApp31");
2829
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
29-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
30+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
3031
}
3132

3233
void Net50()
3334
{
3435
var content = GetGeneratedContent("Net50", [@"microsoft.netcore.app.ref\5.0.0\ref\net5.0"]);
3536
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net50");
3637
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
37-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
38+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
3839
}
3940

4041
void Net60()
4142
{
4243
var content = GetGeneratedContent("Net60", [@"microsoft.netcore.app.ref\6.0.27\ref\net6.0"]);
4344
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net60");
4445
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
45-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
46+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
4647
}
4748

4849
void Net60Windows()
4950
{
5051
var content = GetGeneratedContent("Net60Windows", [@"microsoft.windowsdesktop.app.ref\6.0.27\ref\net6.0"]);
5152
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net60Windows");
5253
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
53-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
54+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
5455
}
5556

5657
void Net70()
5758
{
5859
var content = GetGeneratedContent("Net70", [@"microsoft.netcore.app.ref\7.0.16\ref\net7.0"]);
5960
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net70");
6061
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
61-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
62+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
6263
}
6364

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

7172
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net80.cs"), content.CodeContent, encoding);
72-
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net80.Targets"), content.TargetsContent, encoding);
73+
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net80.targets"), content.TargetsContent, encoding);
74+
}
75+
76+
void Net90()
77+
{
78+
var content = GetGeneratedContent("Net90", [@"microsoft.netcore.app.ref\9.0.0-preview.3.24172.9\ref\net9.0"]);
79+
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net90");
80+
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
81+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
7382
}
7483

7584
void AspNet80()
7685
{
7786
var content = GetGeneratedContent("AspNet80", [@"microsoft.netcore.app.ref\8.0.3\ref\net8.0", @"microsoft.aspnetcore.app.ref\8.0.3\ref\net8.0"]);
7887
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.AspNet80");
7988
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
80-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
89+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
8190
}
8291

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

94103
void NetStandard20()
95104
{
96105
var content = GetGeneratedContent("NetStandard20", [@"netstandard.library\2.0.3\build\netstandard2.0\ref"]);
97106
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.NetStandard20");
98107
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
99-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
108+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
100109
File.WriteAllText(Path.Combine(combinedDir, "Generated.NetStandard20.cs"), content.CodeContent, encoding);
101-
File.WriteAllText(Path.Combine(combinedDir, "Generated.NetStandard20.Targets"), content.TargetsContent, encoding);
110+
File.WriteAllText(Path.Combine(combinedDir, "Generated.NetStandard20.targets"), content.TargetsContent, encoding);
102111
}
103112

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

112121
void Net472()
113122
{
114123
var content = GetGeneratedContent("Net472", [@"microsoft.netframework.referenceassemblies.net472\1.0.3\build\.NETFramework\v4.7.2"], new Regex(@"System\.Enterprise.*"));
115124
var targetDir = Path.Combine(workspacePath, "Basic.Reference.Assemblies.Net472");
116125
File.WriteAllText(Path.Combine(targetDir, "Generated.cs"), content.CodeContent, encoding);
117-
File.WriteAllText(Path.Combine(targetDir, "Generated.Targets"), content.TargetsContent, encoding);
126+
File.WriteAllText(Path.Combine(targetDir, "Generated.targets"), content.TargetsContent, encoding);
118127
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net472.cs"), content.CodeContent, encoding);
119128
File.WriteAllText(Path.Combine(combinedDir, "Generated.Net472.targets"), content.TargetsContent, encoding);
120129
}

0 commit comments

Comments
 (0)