This requires Microsoft Visual Studio 2012 SDK and Microsoft Visual Studio 2012 Visualization & Modeling SDK, which come separately from Visual Studio 2012. Other version combinations are probably possible, and maybe compatible, but untested. The core of the method is this:
- Add AssemblyInfo.tt to
MyProject\Properties
, filling out the "Your xxxxxx" sections. - Open up the project file (e.g.
MyProject.csproj
) in a text editor (e.g. Notepad++), and locate the line that defines the build targets for the language ("import project... microsoft.csharp.targets") - Insert the contents of
MyProject.csproj
there - Finally, if you build the
AssemblyInfo.tt
template within Visual Studio, make sure to setAssemblyInfo1.cs
toBuild Action: None
in the File Properties window. This will fix any errors about duplicate definitions.