Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RSCG - 236 Examples of Roslyn Source Code Generators / 14 created by Microsoft /
# RSCG - 237 Examples of Roslyn Source Code Generators / 15 created by Microsoft /

The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 236 Roslyn Source Code Generator (RSCG) examples. The system transforms individual RSCG projects into structured documentation with code examples and cross-referenced content with a searchable website and code example exports.
The RSCG_Examples repository is a comprehensive documentation system that automatically processes and showcases 237 Roslyn Source Code Generator (RSCG) examples. The system transforms individual RSCG projects into structured documentation with code examples and cross-referenced content with a searchable website and code example exports.

This system serves as both a learning resource for .NET developers interested in source generators and an automated pipeline for maintaining up-to-date documentation about the RSCG ecosystem

## Latest Update : 2025-10-06 => 06 October 2025
## Latest Update : 2025-11-06 => 06 November 2025

If you want to see examples with code, please click ***[List V2](https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG)***

Expand All @@ -24,8 +24,32 @@ If you want to be notified each time I add a new RSCG example , please click htt

## Content

Those are the 236 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 14 from Microsoft )
Those are the 237 Roslyn Source Code Generators that I have tested you can see and download source code example.
( including 15 from Microsoft )
### 237. [Program](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program) , in the [EnhancementClass](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementclass) category

Generated on : 2025-11-06 => 06 November 2025

<details>
<summary>Expand</summary>



Author: Microsoft

Provides APIs for annotating route handler endpoints in ASP.NET Core with OpenAPI annotations.

This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436

Nuget: [https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi)
Comment on lines +42 to +44
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Replace bare URL with a proper Markdown link (lint: MD034).

Avoid bare URLs to satisfy markdownlint.

-This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436 
+This package was built from the source code at [github.com/dotnet/aspnetcore/tree/e77cb01](https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436
Nuget: [https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi)
This package was built from the source code at [github.com/dotnet/aspnetcore/tree/e77cb01](https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436)
Nuget: [https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi)
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

42-42: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In README.md around lines 42 to 44, a bare URL
(https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436)
is used which violates markdownlint MD034; replace the bare URL with a proper
Markdown link (e.g., provide descriptive link text and wrap the URL in
parentheses) so the GitHub source is presented as [Repository or descriptive
text](https://github.com/...) rather than a raw URL, leaving the existing NuGet
markdown link unchanged.



Link: [https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program)

Source: [https://github.com/dotnet/aspnetcore/](https://github.com/dotnet/aspnetcore/)

</details>

### 236. [validly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/validly) , in the [Validator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#validator) category

Generated on : 2025-10-06 => 06 October 2025
Expand Down Expand Up @@ -114,7 +138,7 @@ Source: [https://github.com/hadashiA/VYaml](https://github.com/hadashiA/VYaml)

</details>

### 232. [ConsoleAppFramework](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ConsoleAppFramework) , in the [Console](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#console) category
### 232. [ConsoleAppFramework](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ConsoleAppFramework) , in the [CommandLine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) category

Generated on : 2025-10-02 => 02 October 2025

Expand Down Expand Up @@ -2921,7 +2945,7 @@ Source: [https://github.com/bluehands/Funicular-Switch](https://github.com/blueh

</details>

### 108. [CommandLine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/CommandLine) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category
### 108. [CommandLine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/CommandLine) , in the [CommandLine](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#commandline) category

Generated on : 2024-02-11 => 11 February 2024

Expand Down
2 changes: 1 addition & 1 deletion later.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Just later

## Latest Update : 2025-10-06 => 06 October 2025
## Latest Update : 2025-11-06 => 06 November 2025



Expand Down
30 changes: 30 additions & 0 deletions v2/.tours/Program.tour
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

{
"$schema": "https://aka.ms/codetour-schema",
"title": "Program",
"steps":
[
{
"file": "rscg_examples/Program/src/TestProgram/TestProgram.csproj",
"description": "First, we add Nuget [Microsoft.AspNetCore.OpenApi](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) in csproj ",
"pattern": "Microsoft.AspNetCore.OpenApi"
}

,{
"file": "rscg_examples/Program/src/TestProgram/Program.cs",
"description": "File Program.cs \r\n>> dotnet run --project rscg_examples/Program/src/TestProgram/TestProgram.csproj ",
"pattern": "this is the code"
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern description is unclear. The value "this is the code" doesn't meaningfully describe what pattern should be matched in Program.cs. Consider using a more specific pattern that helps locate the relevant code section, or a descriptive comment that exists in the file.

Suggested change
"pattern": "this is the code"
"pattern": "// Program entry point"

Copilot uses AI. Check for mistakes.
}


,{
"file": "rscg_examples/Program/src/TestProgram/obj/GX/Microsoft.AspNetCore.App.SourceGenerators/Microsoft.AspNetCore.SourceGenerators.PublicProgramSourceGenerator/PublicTopLevelProgram.Generated.g.cs",
"description": "Generated File 1 from 1 : PublicTopLevelProgram.Generated.g.cs ",
"line": 1
}

],

"ref": "main"

}
5 changes: 3 additions & 2 deletions v2/Generator/all.csv
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Nr,Key,Source,Category
105,Weave, https://github.com/otac0n/Weave,FilesToCode
106,WIAD, https://github.com/ignatandrei/RSCG_WhatIAmDoing,AOP
107,NetAutomaticInterface, https://github.com/codecentric/net_automatic_interface,Interface
108,CommandLine, https://github.com/dotmake-build/command-line,EnhancementProject
108,CommandLine, https://github.com/dotmake-build/command-line,CommandLine
109,FunicularSwitch, https://github.com/bluehands/Funicular-Switch,FunctionalProgramming
110,jab, https://github.com/pakrym/jab,DependencyInjection
111,cachesourcegenerator, https://github.com/jeppevammenkristensen/cachesourcegenerator,FunctionalProgramming
Expand Down Expand Up @@ -230,8 +230,9 @@ Nr,Key,Source,Category
229,Facet, https://github.com/Tim-Maes/Facet/,Mapper
230,Unflat, https://github.com/pstlnce/unflat,Database
231,kli.Localize, https://github.com/kl1mm/localize,FilesToCode
232,ConsoleAppFramework, https://github.com/Cysharp/ConsoleAppFramework,Console
232,ConsoleAppFramework, https://github.com/Cysharp/ConsoleAppFramework,CommandLine
233,Vyaml, https://github.com/hadashiA/VYaml,Serializer
234,RapidEnum, https://github.com/hanachiru/RapidEnum,Enum
235,CsvCsharp, https://github.com/nuskey8/Csv-CSharp,Serializer
236,Validly, https://github.com/Hookyns/validly,Validator
237,Program, https://github.com/dotnet/aspnetcore/,EnhancementClass
7 changes: 7 additions & 0 deletions v2/RSCGExamplesData/GeneratorDataRec.json
Original file line number Diff line number Diff line change
Expand Up @@ -1428,5 +1428,12 @@
"Category":40,
"dtStart": "2025-10-06T00:00:00",
"show": true
},

{
"ID":"Program",
"Category":5,
"dtStart": "2025-11-06T00:00:00",
"show": true
}
]
26 changes: 26 additions & 0 deletions v2/rscg_examples/Program/description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"generator":{
"name":"Program",
"nuget":[
"https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi"
],
"link":"https://github.com/dotnet/aspnetcore/blob/70d851104f739fb906aabcd6a07c0935ce2549c9/src/Framework/AspNetCoreAnalyzers/src/SourceGenerators/PublicTopLevelProgramGenerator.cs#L11",
"author":"Microsoft",
"source":"https://github.com/dotnet/aspnetcore/"
},
"data":{
"goodFor":["Generating Program.cs class for testing purposes"],
"csprojDemo":"TestProgram.csproj",
"csFiles":["Program.cs"],
"excludeDirectoryGenerated":[
"Microsoft.AspNetCore.Http.RequestDelegateGenerator",
"Microsoft.AspNetCore.OpenApi.SourceGenerators",
"System.Text.Json.SourceGeneration"
],
"includeAdditionalFiles":[""]
},
"links":{
"blog":"",
"video":""
}
}
3 changes: 3 additions & 0 deletions v2/rscg_examples/Program/nuget.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Provides APIs for annotating route handler endpoints in ASP.NET Core with OpenAPI annotations.

This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/e77cb01b5529c137130757859f09f892dbdd2436
65 changes: 65 additions & 0 deletions v2/rscg_examples/Program/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
ASP.NET Core
============

[![.NET Foundation](https://img.shields.io/badge/.NET%20Foundation-blueviolet.svg)](https://www.dotnetfoundation.org/)
[![MIT License](https://img.shields.io/github/license/dotnet/aspnetcore?color=%230b0&style=flat-square)](https://github.com/dotnet/aspnetcore/blob/main/LICENSE.txt) [![Help Wanted](https://img.shields.io/github/issues/dotnet/aspnetcore/help%20wanted?color=%232EA043&label=help%20wanted&style=flat-square)](https://github.com/dotnet/aspnetcore/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) [![Good First Issues](https://img.shields.io/github/issues/dotnet/aspnetcore/good%20first%20issue?color=%23512BD4&label=good%20first%20issue&style=flat-square)](https://github.com/dotnet/aspnetcore/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
[![Discord](https://img.shields.io/discord/732297728826277939?style=flat-square&label=Discord&logo=discord&logoColor=white&color=7289DA)](https://aka.ms/dotnet-discord)

ASP.NET Core is an open-source and cross-platform framework for building modern cloud-based internet-connected applications, such as web apps, IoT apps, and mobile backends. ASP.NET Core apps run on [.NET](https://dot.net), a free, cross-platform, and open-source application runtime. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac, and Linux. [Learn more about ASP.NET Core](https://learn.microsoft.com/aspnet/core/).

## Get started

Follow the [Getting Started](https://learn.microsoft.com/aspnet/core/getting-started) instructions.

Also check out the [.NET Homepage](https://www.microsoft.com/net) for released versions of .NET, getting started guides, and learning resources.

See the [Triage Process](https://github.com/dotnet/aspnetcore/blob/main/docs/TriageProcess.md) document for more information on how we handle incoming issues.

## How to engage, contribute, and give feedback

Some of the best ways to contribute are to try things out, file issues, join in design conversations,
and make pull-requests.

* [Download our latest daily builds](./docs/DailyBuilds.md)
* Follow along with the development of ASP.NET Core:
* [Community Standup](https://live.asp.net): The community standup is held every week and streamed live on YouTube. You can view past standups in the linked playlist.
* [Roadmap](https://aka.ms/aspnet/roadmap): The schedule and milestone themes for ASP.NET Core.
* [Build ASP.NET Core source code](./docs/BuildFromSource.md)
* Check out the [contributing](CONTRIBUTING.md) page to see the best places to log issues and start discussions.

## Reporting security issues and bugs

Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC) via the [MSRC Researcher Portal](https://msrc.microsoft.com/report/vulnerability/new). You should receive a response within 24 hours. Further information can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/msrc/faqs-report-an-issue). You can also find these instructions in this repo's [Security doc](SECURITY.md).

Also see info about related [Microsoft .NET Bounty Program](https://www.microsoft.com/msrc/bounty-dot-net-core).

## Related projects

These are some other repos for related projects:

* [Documentation](https://github.com/aspnet/Docs) - documentation sources for https://learn.microsoft.com/aspnet/core/
* [Entity Framework Core](https://github.com/dotnet/efcore) - data access technology
* [Runtime](https://github.com/dotnet/runtime) - cross-platform runtime for cloud, mobile, desktop, and IoT apps
* [Razor](https://github.com/dotnet/razor) - the Razor compiler and tooling for working with Razor syntax (.cshtml, .razor)

## Code of conduct

See [CODE-OF-CONDUCT](./CODE-OF-CONDUCT.md)

## Nightly builds

This table includes links to download the latest builds of the ASP.NET Core Shared Framework. Also included are links to download the Windows Hosting Bundle, which includes the ASP.NET Core Shared Framework, the .NET Runtime Shared Framework, and the IIS plugin (ASP.NET Core Module). You can download the latest .NET Runtime builds [here](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table), and the latest .NET SDK builds [here](https://github.com/dotnet/installer#table). **If you're unsure what you need, then install the SDK; it has everything except the IIS plugin.**

| Platform | Shared Framework (Installer) | Shared Framework (Binaries) | Hosting Bundle (Installer) |
| :--------- | :----------: | :----------: | :----------: |
| **Windows x64** | [Installer](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-win-x64.exe) | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-win-x64.zip) | [Installer](https://aka.ms/dotnet/10.0/daily/dotnet-hosting-win.exe) |
| **Windows x86** | [Installer](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-win-x86.exe) | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-win-x86.zip) | [Installer](https://aka.ms/dotnet/10.0/daily/dotnet-hosting-win.exe) |
| **Windows arm64** | [Installer](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-win-arm64.exe) | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-win-arm64.zip) | [Installer](https://aka.ms/dotnet/10.0/daily/dotnet-hosting-win.exe) |
| **macOS x64** | **N/A** | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-osx-x64.tar.gz) | **N/A** |
| **macOS arm64** | **N/A** | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-osx-arm64.tar.gz) | **N/A** |
| **Linux x64** | [Deb Installer](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-x64.deb) - [RPM Installer](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-x64.rpm) | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-linux-x64.tar.gz) | **N/A** |
| **Linux arm** | **N/A** | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-linux-arm.tar.gz) | **N/A** |
| **Linux arm64** | [RPM Installer](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-aarch64.rpm) | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-linux-arm64.tar.gz) | **N/A** |
| **Linux-musl-x64** | **N/A** | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-linux-musl-x64.tar.gz) | **N/A** |
| **Linux-musl-arm** | **N/A** | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-linux-musl-arm.tar.gz) | **N/A** |
| **Linux-musl-arm64** | **N/A** | [Binaries](https://aka.ms/dotnet/10.0/daily/aspnetcore-runtime-linux-musl-arm64.tar.gz) | **N/A** |
Comment on lines +1 to +65
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace with a focused example README.

This file contains the full ASP.NET Core framework README, which is off-topic for an RSCG example project. The example should have a concise README explaining what this specific Program.cs generation example demonstrates—e.g., the minimal Web API pattern, OpenAPI integration, and how the source generator is used.

Consider replacing this with a focused README like:

# Program.cs Example

This example demonstrates the use of `PublicTopLevelProgramGenerator` from Microsoft.AspNetCore.OpenApi to generate a minimal Web API with OpenAPI support.

## What it shows
- Generated Program.cs with top-level statements
- OpenAPI (Swagger) integration
- Todo API endpoints
- Development vs. production configuration

## Running the example
1. Open the solution or project
2. Run the application
3. Navigate to http://localhost:5219/todos

## Related files
- `Program.cs` - Generated entry point with Web API
- `launchSettings.json` - Local development configuration
- `TestProgram.http` - HTTP request samples
🧰 Tools
🪛 LanguageTool

[style] ~18-~18: Try using a synonym here to strengthen your writing.
Context: ...ues. ## How to engage, contribute, and give feedback Some of the best ways to cont...

(GIVE_PROVIDE)

🤖 Prompt for AI Agents
In v2/rscg_examples/Program/readme.txt lines 1-65, the file currently contains
the full ASP.NET Core framework README which is off-topic for this example;
replace it with a concise, focused README describing what this specific
Program.cs generation example demonstrates (e.g., PublicTopLevelProgramGenerator
usage, minimal Web API pattern, OpenAPI/Swagger integration, Todo endpoints, dev
vs prod behavior), include brief sections: What it shows, Running the example
(steps to open/run and sample URL), and Related files (Program.cs,
launchSettings.json, TestProgram.http); remove the unrelated framework content
and ensure the new README is short, example-specific, and clearly points to the
generated Program.cs and how to exercise the sample.

3 changes: 3 additions & 0 deletions v2/rscg_examples/Program/src/TestProgram.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Solution>
<Project Path="TestProgram/TestProgram.csproj" />
</Solution>
48 changes: 48 additions & 0 deletions v2/rscg_examples/Program/src/TestProgram/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Http.HttpResults;

var builder = WebApplication.CreateSlimBuilder(args);

builder.Services.ConfigureHttpJsonOptions(options =>
{
options.SerializerOptions.TypeInfoResolverChain.Insert(0, AppJsonSerializerContext.Default);
});

// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}

Todo[] sampleTodos =
[
new(1, "Walk the dog"),
new(2, "Do the dishes", DateOnly.FromDateTime(DateTime.Now)),
new(3, "Do the laundry", DateOnly.FromDateTime(DateTime.Now.AddDays(1))),
new(4, "Clean the bathroom"),
new(5, "Clean the car", DateOnly.FromDateTime(DateTime.Now.AddDays(2)))
];

var todosApi = app.MapGroup("/todos");
todosApi.MapGet("/", () => sampleTodos)
.WithName("GetTodos");

todosApi.MapGet("/{id}", Results<Ok<Todo>, NotFound> (int id) =>
sampleTodos.FirstOrDefault(a => a.Id == id) is { } todo
? TypedResults.Ok(todo)
: TypedResults.NotFound())
.WithName("GetTodoById");

app.Run();

public record Todo(int Id, string? Title, DateOnly? DueBy = null, bool IsComplete = false);

[JsonSerializable(typeof(Todo[]))]
internal partial class AppJsonSerializerContext : JsonSerializerContext
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "todos",
"applicationUrl": "http://localhost:5219",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
18 changes: 18 additions & 0 deletions v2/rscg_examples/Program/src/TestProgram/TestProgram.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
</Project>
11 changes: 11 additions & 0 deletions v2/rscg_examples/Program/src/TestProgram/TestProgram.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@TestProgram_HostAddress = http://localhost:5219

GET {{TestProgram_HostAddress}}/todos/
Accept: application/json

###

GET {{TestProgram_HostAddress}}/todos/1
Accept: application/json

###
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions v2/rscg_examples/Program/src/TestProgram/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
39 changes: 39 additions & 0 deletions v2/rscg_examples/Program/video.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"scriptName": "Program",
"steps":
[
{"typeStep":"exec","arg":"clipchamp.exe launch"},
{"typeStep":"text","arg": "Welcome to Roslyn Examples"},
{"typeStep":"text","arg":"If you want to see more examples , see List Of RSCG"},
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG"},
{"typeStep":"text","arg": "My name is Andrei Ignat and I am deeply fond of Roslyn Source Code Generator. "},

{"typeStep":"text","arg": "Today I will present Microsoft.AspNetCore.OpenApi . Generating Program.cs class for testing purposes ."},
{"typeStep":"browser","arg":"https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi"},
{"typeStep":"text","arg": "The whole example is here"},
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program"},
{"typeStep":"text","arg": "You can download the code from here"},
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-"},
{"typeStep":"text","arg":"Here is the code downloaded "},
{"typeStep":"exec","arg":"explorer.exe /select,D:\\gth\\RSCG_Examples\\v2\\Generator.sln"},
{"typeStep":"text","arg": "So , let's start the project with Visual Studio Code "},
{"typeStep":"stepvscode","arg": "-n D:\\gth\\RSCG_Examples\\v2"},

{"typeStep":"text","arg": "To use it ,you will put the Nuget Microsoft.AspNetCore.OpenApi into the csproj "},

{"typeStep":"stepvscode","arg": "-r -g D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\Program\\src\\TestProgram\\TestProgram.csproj"},

{"typeStep":"text","arg": "And now I will show you an example of using Microsoft.AspNetCore.OpenApi"},

{"typeStep":"hide","arg": "now execute the tour in VSCode"},
{"typeStep":"tour", "arg": "src/.tours/"},
{"typeStep":"text","arg":" And I will execute the project"},
{"typeStep":"showproj", "arg":"TestProgram.csproj"},
{"typeStep":"text","arg":" This concludes the project"},
{"typeStep":"waitseconds","arg":"30"},
{"typeStep":"text","arg": "Remember, you can download the code from here"},
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-",
SpeakTest=" "},
Comment on lines +35 to +36
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent property naming in JSON object. Line 36 has SpeakTest=" " instead of using the camelCase pattern speakTest or "arg" key like other properties in the array. This inconsistency could cause issues if the parser expects specific property names.

Suggested change
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-",
SpeakTest=" "},
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-"},

Copilot uses AI. Check for mistakes.
{"typeStep":"waitseconds","arg":"30"},
Comment on lines +36 to +37
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma after the last array element. The JSON array has a trailing comma after the last object (line 37), which will cause a parse error in strict JSON parsers.

Suggested change
SpeakTest=" "},
{"typeStep":"waitseconds","arg":"30"},
SpeakTest=" "}
{"typeStep":"waitseconds","arg":"30"}

Copilot uses AI. Check for mistakes.
]
Comment on lines +35 to +38
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix JSON parse errors (invalid key syntax).

The object uses SpeakTest=" " which is not valid JSON. Use a quoted key and colon.

Apply this patch:

-{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-",
-SpeakTest=" "},
+{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-",
+"SpeakTest": " "},
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-",
SpeakTest=" "},
{"typeStep":"waitseconds","arg":"30"},
]
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/Program#download-example-net--c-",
"SpeakTest": " "},
{"typeStep":"waitseconds","arg":"30"},
]
🧰 Tools
🪛 Biome (2.1.2)

[error] 35-36: Property key must be double quoted

(parse)


[error] 36-36: unexpected character =

(parse)


[error] 36-36: expected , but instead found " "

Remove " "

(parse)


[error] 36-36: expected : but instead found }

Remove }

(parse)


[error] 37-38: Expected an array, an object, or a literal but instead found ']'.

Expected an array, an object, or a literal here.

(parse)

🤖 Prompt for AI Agents
In v2/rscg_examples/Program/video.json around lines 35 to 38, the JSON object
uses invalid key syntax SpeakTest=" " which breaks parsing; replace it with a
proper JSON key/value pair "SpeakTest": " " and ensure the surrounding object
uses commas and colons correctly (e.g.,
{"typeStep":"browser","arg":"https://...","SpeakTest":" "},) so the array and
JSON remain valid.

}
Loading
Loading