curlysemi / R4Mvc5

R4MVC5 is a Roslyn code generator for ASP.NET MVC5 apps that creates strongly typed helpers that eliminate the use of literal strings in many places
Apache License 2.0
1 stars 0 forks source link

Completely replace T4MVC #3

Closed curlysemi closed 5 years ago

curlysemi commented 5 years ago

Right now, R4MVC5 doesn't update the project file to include the generated files like T4MVC does. Need to look into the Roslyn code generation API and see what support there is for manipulation of old project files.

curlysemi commented 5 years ago

Looks like we can add files, but might not be able to set DependentUpon, according to https://gitter.im/dotnet/roslyn/archives/2016/02/10.

I'll keep looking into it. If it is decided that a complete, exact replacement of T4MVC isn't tenable, then we can generate a single file for all the generated classes, I guess.

curlysemi commented 5 years ago

Due to the lack of DependentUpon, I decided not to mirror T4MVC exactly. The difference is that instead of split [Name]Controller.generated.cs files and a T4MVC.cs file, we instead have one T4MVC.generated.cs file. (The settings file is different, too. I also removed the file for custom T4Extensions.)

R4Mvc5 does not currently modify the project file.

I'll need to update the README later with instructions on how to add R4Mvc5 to a new project and instructions on how to switch from T4MVC. I'll create an issue for that.