T4 Template for Entity Framework and TFS

Today I found that TFS does not handle classes generated by T4 perfectly. I updated my Entity Framework edmx framework , which runs the T4 template to run. The template deletes and overwrites all .cs files. Then it seems that TFS cannot keep up and thinks that all of them are deleted.

When I look at pending changes and try to undo, TFS complains that the files still exist, and if I want to undo, I first need to delete the local files.

I thought we could just exclude the generated files from TFS, but I'm not sure if this will work in automated build environments.

I also found this article , but the solutions provided still seem rather tedious.

Is there a better solution around this?

+4
source share

Source: https://habr.com/ru/post/1502685/


All Articles