Nerdbank gitversion is incompatible with WPF targets and SDK projects. Either ThisAssembly will be inaccessible due to protection level, or the generation of Version.cs in the WPF temp project breaks incremental build.
From my investigation, I believe 3 things are needed:
- Make
GenerateAssemblyVersionInfo run before MarkupCompilePass1
- Do not run
GenerateAssemblyVersionInfo inside the WPF temporary project.
- Re-include the
Version.cs generated from the original project in the WPF temporary project.
See https://devdiv.visualstudio.com/DevDiv/VS%20IDE%20CPS/_git/CPS/pullrequest/120052?_a=overview for the workarounds I performed to get this to work.
Nerdbank gitversion is incompatible with WPF targets and SDK projects. Either
ThisAssemblywill be inaccessible due to protection level, or the generation of Version.cs in the WPF temp project breaks incremental build.From my investigation, I believe 3 things are needed:
GenerateAssemblyVersionInforun beforeMarkupCompilePass1GenerateAssemblyVersionInfoinside the WPF temporary project.Version.csgenerated from the original project in the WPF temporary project.See https://devdiv.visualstudio.com/DevDiv/VS%20IDE%20CPS/_git/CPS/pullrequest/120052?_a=overview for the workarounds I performed to get this to work.