DesignTime Builds and generated code vs Hot Reload #9434
Replies: 3 comments 8 replies
-
@AArnott do you have any experience with this from https://github.com/dotnet/Nerdbank.GitVersioning? |
Beta Was this translation helpful? Give feedback.
-
Hi, we just stumbled to this discussion/issue and are using minver for our product versioning. |
Beta Was this translation helpful? Give feedback.
-
I got bit by this too, I can't hot reload because the assemblyinfo is generated, and when I try to hot-reload a dependent project I get:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When using compile-time generation of code such as
<GenerateAssemblyInfo>
it's difficult to work with differences that may occur in Hot Reload. Example: if using a git-versioning package that checks the commit history (E.g. MinVer https://github.com/adamralph/minver/) it's useful to NOT generate the version information during design time builds, because it slows down the build. The problem then is that Design Time Builds will generate incorrect/modified version info, which can be detected by Hot Reload. If these are edits that cannot be applied, which is the case with versions attributes, then Hot Reload breaks.I'm having trouble understanding exactly which files are being considered for changes by hot reload, and why it would decide that
or
Is the only way of working around this to generate version info equally even in design time builds? I don't want to update the info (it checks git history), I just want the compilations done both by hot reload and design time builds to use whatever info is already created, if any.
Beta Was this translation helpful? Give feedback.
All reactions