Closed curlysemi closed 5 years ago
As far as getting this to work with Release Manager for TFS, VSTS, Azure DevOps, or whatever Microsoft has decided to call it, the strategy we're using is to track the EXE and all dependencies in the repo, and have prebuild events for all MVC projects that invokes the EXE. (This gives us the flexibility to patch R4Mvc5 as needed.)
A slightly more sophisticated pre-build event (assuming you have the EXE in-tree with the path "Utils/R4Mvc5/" (all the dependencies you need should be in the same directory as the EXE)):
if EXIST "$(SolutionDir)\Utils\R4Mvc5\R4Mvc5.exe" ("$(SolutionDir)\Utils\R4Mvc5\R4Mvc5.exe" generate -p "$(ProjectPath)" ) else (exit 2)
Instructions added in a677f8442a21310c904317b68fbe4b9189ca23df.
Need to update the README with instructions on how to add R4Mvc5 to a new project and instructions on how to switch from T4MVC.
We still need to figure out if we want to do this as a package or an executable.
Right now, here are tentative instructions for how to replace T4MVC for a project called 'MyLameProject':
MyLameProject
(including template (.tt
) and settings). (Leave the T4MVCExtensions dependency!)R4Mvc.Tools
project. [NOTE TO SELF: Rename project.]src\R4Mvc.Tools\bin\Debug\net461\
(orsrc\R4Mvc.Tools\bin\Release\net461\
) to your PATH.MyLameProject
project file.Properties
.Build Events
tab, add the following to the "Pre-build event command line" text area:r4mcv.json
andT4MVC.generated.cs
to your project file. If you didn't run the command earlier, build the project, watch it fail (it'll generate the files, though), turn show all files off and on again, and add to the solution.r4mcv.json
andT4MVC.generated.cs
will probably be renamed soon (as they should be).