Reputation: 13561
I have a reasonable (although imprecise) idea as to what source generators do, but I have several projects in a solution that reference Microsoft.VisualStudio.Web.CodeGeneration.Design
and the projects don't (to the best of my knowledge) have any source generators.
Given that this is source generation, I might be mistaken about the usage or it could be used indirectly. How can I determine whether it is safe to remove the reference? There isn’t anything else in the CodeGeneration namespace in the solution.
Upvotes: 2
Views: 896
Reputation: 3160
That package is used to scaffold various aspects in web projects:
Probably those projects have been created/updated with scaffolding, that is the reason of the reference to Microsoft.VisualStudio.Web.CodeGeneration.Design package
It seems that is needed only if developing via cli:
Upvotes: 4
Reputation: 4530
It's generally safe to remove a reference which doesn't prevent compilation when absent.
Microsoft.VisualStudio.Web.CodeGeneration.Design
seems like a very weird thing to reference in a project - I believe it's used for generating the default code for views & controllers so I'm pretty sure it can be removed as long as it still compiles.
Upvotes: 0