Skip to content

Commit 5266a0f

Browse files
committed
Convert ps1 to simple C# application
1 parent e845ff4 commit 5266a0f

7 files changed

Lines changed: 487 additions & 353 deletions

File tree

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
// Use IntelliSense to find out which attributes exist for C# debugging
9+
// Use hover for the description of the existing attributes
10+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
11+
"name": "Generate",
12+
"type": "coreclr",
13+
"request": "launch",
14+
"preLaunchTask": "build generate",
15+
// If you have changed target frameworks, make sure to update the program path.
16+
"program": "${workspaceFolder}/artifacts/bin/Generate/debug/Generate.dll",
17+
"args": [],
18+
"cwd": "${workspaceFolder}/Generate",
19+
"console": "internalConsole",
20+
"stopAtEntry": false
21+
},
22+
]
23+
}

.vscode/tasks.json

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
{
22
"version": "2.0.0",
33
"tasks": [
4-
{
5-
"type": "dotnet",
6-
"task": "build",
7-
"problemMatcher": [
8-
"$msCompile"
9-
],
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Basic.Reference.Assemblies.sln",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile",
15+
"group": {
16+
"kind": "build",
17+
"isDefault": true
18+
},
19+
},
20+
{
21+
"label": "build generate",
22+
"command": "dotnet",
23+
"type": "process",
24+
"args": [
25+
"build",
26+
"${workspaceFolder}/Generate/Generate.csproj",
27+
"/property:GenerateFullPaths=true",
28+
"/consoleloggerparameters:NoSummary"
29+
],
30+
"problemMatcher": "$msCompile",
1031
"group": {
1132
"kind": "build",
1233
"isDefault": true
1334
},
14-
"label": "dotnet: build"
1535
}
1636
]
1737
}

Basic.Reference.Assemblies.sln

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic.Reference.Assemblies"
1515
EndProject
1616
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic.Reference.Assemblies.Net472", "Basic.Reference.Assemblies.Net472\Basic.Reference.Assemblies.Net472.csproj", "{6F49C153-3DB0-4286-AA66-51B1603D84AC}"
1717
EndProject
18-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{880F6BAB-9DE7-45C7-BBEB-D64EE9F2CC53}"
19-
ProjectSection(SolutionItems) = preProject
20-
Scripts\Generate.ps1 = Scripts\Generate.ps1
21-
EndProjectSection
22-
EndProject
2318
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic.Reference.Assemblies.Net60", "Basic.Reference.Assemblies.Net60\Basic.Reference.Assemblies.Net60.csproj", "{E2269796-09B5-40C8-85ED-476B5E71B29D}"
2419
EndProject
2520
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Basic.Reference.Assemblies.Net461", "Basic.Reference.Assemblies.Net461\Basic.Reference.Assemblies.Net461.csproj", "{214260A9-1E3C-400C-A0D1-2BD099F60AD7}"
@@ -34,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic.Reference.Assemblies.
3429
EndProject
3530
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic.Reference.Assemblies.AspNet80", "Basic.Reference.Assemblies.AspNet80\Basic.Reference.Assemblies.AspNet80.csproj", "{AD797DEA-E9DC-470B-861C-F049AD858B2C}"
3631
EndProject
32+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generate", "Generate\Generate.csproj", "{597AECC8-C644-4E8B-A429-B1F8CA015C90}"
33+
EndProject
3734
Global
3835
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3936
Debug|Any CPU = Debug|Any CPU
@@ -200,6 +197,18 @@ Global
200197
{AD797DEA-E9DC-470B-861C-F049AD858B2C}.Release|x64.Build.0 = Release|Any CPU
201198
{AD797DEA-E9DC-470B-861C-F049AD858B2C}.Release|x86.ActiveCfg = Release|Any CPU
202199
{AD797DEA-E9DC-470B-861C-F049AD858B2C}.Release|x86.Build.0 = Release|Any CPU
200+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
201+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Debug|Any CPU.Build.0 = Debug|Any CPU
202+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Debug|x64.ActiveCfg = Debug|Any CPU
203+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Debug|x64.Build.0 = Debug|Any CPU
204+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Debug|x86.ActiveCfg = Debug|Any CPU
205+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Debug|x86.Build.0 = Debug|Any CPU
206+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|Any CPU.ActiveCfg = Release|Any CPU
207+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|Any CPU.Build.0 = Release|Any CPU
208+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x64.ActiveCfg = Release|Any CPU
209+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x64.Build.0 = Release|Any CPU
210+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x86.ActiveCfg = Release|Any CPU
211+
{597AECC8-C644-4E8B-A429-B1F8CA015C90}.Release|x86.Build.0 = Release|Any CPU
203212
EndGlobalSection
204213
GlobalSection(SolutionProperties) = preSolution
205214
HideSolutionNode = FALSE

Docs/Updating.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,5 @@ To upgrade an existing target framework do the following:
5353
5454
1. Navigate to https://www.nuget.org/packages/Microsoft.NETCore.App.Ref and find the latest version for the target framework. For say `net6.0` that will be the latest version begining with `6.0`.
5555
2. Move to that version in the appropriate project file. For say `net6.0` that wil be Basic.Reference.Assemblies.Net60.csproj
56-
3. Move to that version in Generate.ps1 for the target framework
57-
4. Run `Scripts\Generate.ps1`
58-
56+
3. Move to that version in `Generate\Program.cs` for the target framework
57+
4. Run `dotnet run Generate\Generate.csproj`

Generate/Generate.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
</Project>

0 commit comments

Comments
 (0)