bennor / AutoT4MVC

A zero-configuration Visual Studio 2012+ extension for automatically running T4MVC templates on build and when files are modified in paths that T4MVC cares about.
http://bennor.github.io/AutoT4MVC/
MIT License
24 stars 9 forks source link

When using with TFS, T4MVC.tt.settings.xml doesn't automatically get checked out #7

Closed jeffmcardle closed 11 years ago

jeffmcardle commented 11 years ago

This causes a build error. Is there any way to make it automatically check this file out from source control?

davidebbo commented 11 years ago

@jeffmcardle just guessing here as I'm not familiar with the code, but maybe the problem is that this T4MVC.tt.settings.xml file didn't exist when AutoT4MVC was first written, so it needed to be modified to account for it.

@bennor any thoughts?

davidebbo commented 11 years ago

Maybe this is a T4MVC issue and not AutoT4MVC specific. Does it repro when you manually run the custom tool?

See http://t4mvc.codeplex.com/discussions/403390

bennor commented 11 years ago

To run the template, all AutoT4MVC does is open and save the T4MVC.tt file(s) (triggering a rerun). The other files that T4MVC uses (or generates) shouldn't matter and the result should be the same as if you run it manually.

The only thing the code does with T4MVC.tt.settings.xml is monitor it for changes (so if you change your settings, a rebuild is triggered).

I suspect that some part of the template itself is saving the settings file (perhaps by accident).

bennor commented 11 years ago

I will check tonight to make sure that it's not incorrectly detecting the settings file as a template (and therefore opening and saving it), but looking at the code it's doing a direct StringComparer.OrdinalIgnoreCase.Equals() comparison on the project item name, so it shouldn't be.

davidebbo commented 11 years ago

Yes, see my latest comment on http://t4mvc.codeplex.com/discussions/403390. It's not your issue :)

davidebbo commented 11 years ago

@jeffmcardle a fix is available is T4MVC. Please see codeplex thread for details.

jeffmcardle commented 11 years ago

Thanks guys. Checking it out now.