roslyn-sdk icon indicating copy to clipboard operation
roslyn-sdk copied to clipboard

Add SourceGenerator and Analyzer templates

Open ryzngard opened this issue 5 years ago • 9 comments

This adds templates to the sdk that can be used with dotnet new to create new projects for each of these.

Proposed naming:

dotnet new sourcegen => new c# source generator dotnet new analyzer => new c# analyzer

TODO:

  • [x] Package templates
  • [ ] Choose correct author
  • [ ] Finalize template contents
  • [x] Add packaging project (for both?)
  • [ ] Add test project (for both)

ryzngard avatar Sep 02 '20 19:09 ryzngard

This is pretty basic outlines, but I wanted to get the work going to add these. @davidwengier I think you had a better template for source generators?

@sharwell and @mavasani is there anything missing in the analyzer?

ryzngard avatar Sep 02 '20 19:09 ryzngard

is there anything missing in the analyzer?

The analyzer template appears to be missing at least:

  • Packaging project
  • Test project
  • NuGet.config

sharwell avatar Sep 02 '20 19:09 sharwell

is there anything missing in the analyzer?

The analyzer template appears to be missing at least:

  • Packaging project
  • Test project
  • NuGet.config

Adding the two projects to the todo list at top. What is the NuGet.config for?

ryzngard avatar Sep 02 '20 19:09 ryzngard

What is the NuGet.config for?

The test library updates are published to the dotnet-tools feed, not NuGet. When you add the test project to the template, it will only restore properly if the NuGet feed is defined.

sharwell avatar Sep 24 '20 16:09 sharwell

Does this need someone to take it to the finish line?

peteraritchie avatar Apr 21 '22 12:04 peteraritchie

Likely this won't be the final template. Instead I believe @jmarolf had some ideas...

Happy to pick this back up, but it looked like more work was needed to decide what the template should actually contain.

ryzngard avatar Apr 21 '22 17:04 ryzngard

@ryzngard should we close this PR out?

jmarolf avatar Jun 06 '22 21:06 jmarolf

@jmarolf do you mean abandon, or update and try to get this in with current plan?

ryzngard avatar Jun 06 '22 21:06 ryzngard

Any update for this

WeihanLi avatar Aug 20 '23 15:08 WeihanLi