T4MVC / R4MVC

R4MVC is a Roslyn code generator for ASP.NET Core MVC apps that creates strongly typed helpers that eliminate the use of literal strings in many places
Apache License 2.0
157 stars 48 forks source link

Tool command: Remove #63

Closed artiomchi closed 6 years ago

artiomchi commented 7 years ago

This command will remove any generated code files from the project, created by R4Mvc. It might not be used a lot, but it might be useful in some circumstances.

Removing T4MVC is relatively easy (just delete the T4MVC. files from the project. Compared to that, R4Mvc generates `.generated.cs` files for each controller, next to the controller files. The main reason for that is the auto-nesting feature in .NET Core projects - doing it this way removes clutter. The added benefit is when the user looks at the list of changes in his project in the commit window, the generated files will be next to the controller files.

The side effect is that removing R4Mvc becomes more complicated, since you have to trace and remove all the .generated.cs files from the project, making sure you only remove the R4Mvc ones.

The command can be invoked either in PowerShell (Remove-R4Mvc) or in dotnet cli (dotnet r4mvc remove). We'll also have a parameter to also remove the r4mvc.json file.

artiomchi commented 6 years ago

Recently completed