T4.FileManager.VisualStudio icon indicating copy to clipboard operation
T4.FileManager.VisualStudio copied to clipboard

BUG: Wrong file property value set

Open nobyArdor opened this issue 1 year ago • 0 comments

Bug description There is a bug in the function SetPropertyValue where it can be called with a different ProjectItem than the one linked to the generated file when there is another file in the solution with the same name.

Expected behaviour Function SetPropertyValue set value only for generated files.

Reason Method T4FileManager.FindProjectItem(string projectName, string filename) in result ignore projectName parameter.

Suggestion Change the AddMissingFileToProject function result to ProjectItem and modify the T4FileManager.FindProjectItem method to have the same parameters as T4FileManager.HasProjectItem. Change the return type of the AddMissingFileToProject function to ProjectItem and modify the parameters of the T4FileManager.FindProjectItem function to match those of the T4FileManager.HasProjectItem function.

Fix example https://github.com/databinding-gmbh/T4.FileManager.VisualStudio/commit/0a4d9a0fdbb85d1c229253f86ffea7abf7743a0c

nobyArdor avatar Jul 22 '24 15:07 nobyArdor