generator-csharp icon indicating copy to clipboard operation
generator-csharp copied to clipboard

What's missing?

Open sayedihashimi opened this issue 9 years ago • 11 comments

We recently got started on this project and for the initial release we are thinking to have the following content below.

Generators (project templates)

  • Class library
  • Portable class library
  • Console app
  • xUnit test project

Sub-generators (item templates)

  • New Class
  • New Interface
  • app.config
  • AssemblyInfo.cs
  • Resource file
  • xUnit test case

I'd like to find out what you think is missing here and how we can make this better.

sayedihashimi avatar Apr 04 '15 21:04 sayedihashimi

Is it possible to detect or be able to specify the version of the .net framework being targeted and if it's .net 5 then use the new project structure? Or should a new generator be created for .net 5 projects?

ciwchris avatar Apr 06 '15 20:04 ciwchris

@ciwchris thanks for the reply.

VS telemetry tells us that most people pick the latest framework to target. Also it's easy to modify the target Fx after creating the project. You just edit the <TargetFramework> element in the .csproj file.

That being said we could consider a --fx switch which could set this. This is similar to the --gulp option available in the asp.net 5 yo generators.

Thoughts?

sayedihashimi avatar Apr 06 '15 23:04 sayedihashimi

I'm liking @sayedihashimi 's idea about having a --fx- flag.

shmuelie avatar Apr 06 '15 23:04 shmuelie

I created #14. I'm supportive of it.

sayedihashimi avatar Apr 06 '15 23:04 sayedihashimi

I was hoping to not use .csproj files and instead have projects created similar to the sample console app when using .net5. Could the default be no .csproj files but if an older version is specified using the --fx flag then .csproj files would be used?

ciwchris avatar Apr 07 '15 00:04 ciwchris

Unless I'm misunderstanding something the new JSON based project files are only for ASP.NET, or are they for all .NET vNext?

shmuelie avatar Apr 07 '15 01:04 shmuelie

@ciwchris I like that idea :smile:

@SamuelEnglard The new JSON based project files can be used to build any project type (build not run). It's a project system that supports cross compilation and producing nuget packages out of the box.

davidfowl avatar Apr 07 '15 01:04 davidfowl

So is JSON replacing *proj files? If so then clearly when targeting latest we should use it. If not we might need another flag, though I'd make the default JSON still for newest

shmuelie avatar Apr 07 '15 02:04 shmuelie

I was hoping to not use .csproj files and instead have projects created similar to the sample console app when using .net5.

As Fowler mentioned you would use generator-aspnet in that case. I just posted a wiki on the goals of generator-aspnet and how we are recommending for others to create related generators https://github.com/OmniSharp/generator-aspnet/wiki/goals-and-related-generators.

So is JSON replacing *proj files?

No (or at least not yet). If they do then we will adapt this generator as well as generator-aspnet to align with whatever Visual Studio ships.

sayedihashimi avatar Apr 07 '15 03:04 sayedihashimi

Thank you for the clarification, I did not realize there was a new console application under aspnet, that was unexpected.

ciwchris avatar Apr 07 '15 04:04 ciwchris

We're in the process of refining it.

davidfowl avatar Apr 07 '15 05:04 davidfowl