I am trying to use the WriteCodeFragment MSBuild task to create an AssemblyVersion attribute. I’m having a problem creating a property group to correctly pass the ITaskItem array required for processing. Can someone help with an example?
I am trying to use the WriteCodeFragment MSBuild task to create an AssemblyVersion attribute.
Share
This creates a file called
BuildVersion.cswith anAssemblyVersionattribute of123.123.123.123. IfOutputFileis removed then a randomly generated file name will be used instead. TheCompileitem name automatically adds the item to the Compile items (includesBuildVersion.csin the build). TheFileWritesitem name allows the file to be removed during Clean.