NEW ARM64 support (please give feedback, i cannot easily test this.)
This extension automatically modifies the AssemblyName of a given assembly (.csproj) and reloads a set of dependent projects in a soltution.
Note: This is still a work in progress, so the following steps might change, going forward.
I created a github repo here where issues can be created:
Also, there's a demo repo that shows how the extension works here:
Add a file named AutoUpdateAssemblyName.txt into the root folder of the solution (Solution Items in the Solution Explorer).
This file contains the project names of the projects you want to unload + reload when the project is built, one per line.
It now also allows for either paths to the .csproj file (which will be resolved from the solution directory, apparently) and nested solution-specific relative paths (if you don't have a .csproj extension.
Note: comments (lines beginning with ', rem, #, -- or //) as well as whitespace-only lines are ignored.
In the .csproj of the Source generator project (which should be line1, see above), add a comment <!--AutoUpdateAssemblyName--> somewhere.
Also in the .csproj, in the <AssemblyName> property, make sure to add a . followed by a number at the end of the Assembly Name, so the extension knows what to increment. I'm not doing anything, if i can't find that.
Note: currently, the .csprojparsing is very crude - i just pick the first part between <AssemblyName> and </AssemblyName> split that on ., and try to increment the last split part there. See TODOs further down.
Improve .csprojparsing to enable conditional AssemblyNames (e.g. I only want to add a suffix when in DEBUG)
Only look at AutoUpdateAssemblyName.txt when it's changed, not on each build (it's a small file, so that shouldn't matter, but ... well ...
1.6 - (hopefully) fixed VS crash because of an Error with DTE.ActiveDocument - using VS.Documents.GetActiveDocumentViewAsync now...
1.5 - Added arm64 compatibility (please give feedback)
1.4.2 - enabled finding nested projects for restarting, improved (hopefully, please give feedback) reloading