Skip to content
This repository was archived by the owner on Mar 31, 2024. It is now read-only.

Generates code from templates using the new roslyn source generator.

Notifications You must be signed in to change notification settings

JoshDiDuca/CodeSourceGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Source Generator

Code source generator is a visual studio analyzer which allows you to generate source files with access to objects within the solution. The aim of this project is so it can be used for generating any type of source file easily from a template, whether it be typescript, html, javascript or even documentation.

This project is built using .NET 5 preview and since source generators are currently still a preview feature. You will need the latest version of preview .NET 5, the latest preview of Visual Studio with the 'C# and Visual Basic Roslyn compilers' individual component installed in order to run this solution.

Please note: This project has been put on hold until .NET 5 releases more features but this project does work with .NET 5 preview projects and is still a very eligant solution for code generation within your projects.

Features

  • Templating using scriban
  • Completely flexible generating
  • Access to all compilation objects
  • Generate any type of file
  • Documentation examples
  • Typescript examples

Additional Links

https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/

https://github.com/dotnet/roslyn-sdk/tree/master/samples/CSharp/SourceGenerators

https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.md

https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT CodeSourceGenerator

About

Generates code from templates using the new roslyn source generator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages