如何确定是否使用Microsoft.visualstudio.web.codegener.design?

发布于 2025-02-14 01:04:17 字数 229 浏览 1 评论 0 原文

关于源生成器的工作,我有一个合理的(尽管不精确),但是我在一个解决方案中有几个项目,该项目参考 microsoft.visualstudio.web.codegeneration.design.design and over over(我知道的最好的)有任何源生成器。

鉴于这是源的生成,我可能会误认为使用情况,或者可以间接使用。如何确定是否可以安全删除参考?解决方案中的代码代名称空间中没有其他内容。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南风几经秋 2025-02-21 01:04:17

该软件包用于网络项目中的各个方面:

可能已经使用,这就是引用microsoft.visualstudio.web.codegeneration.design软件包的

原因似乎只有通过CLI开发:

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:

Microsoft.VisualStudio.Web.CodeGeneration.Design - Code Generation tool for ASP.NET Core. Contains the dotnet-aspnet-codegenerator command used for generating controllers and views.

dotnet-aspnet-codegenerator is only required to scaffold from the command line, it's not needed to use scaffolding with Visual Studio.

柠栀 2025-02-21 01:04:17

通常可以安全地删除参考,该参考不会在缺乏时阻止汇编。

microsoft.visualstudio.web.codegeneration.design 似乎是在项目中引用的一件非常奇怪的事情 - 我相信它用于生成视图&amp&控制器,所以我很确定只要它仍然编译,就可以将其删除。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文