[英]Mixing packageReference and packages.config in one Solution?
We have a large solution (mainly .NET 4.7) with a legacy ASP.NET application and many other projects.我们有一个包含遗留 ASP.NET 应用程序和许多其他项目的大型解决方案(主要是 .NET 4.7)。 It is infeasible to move the whole solution to .NET core.
将整个解决方案移至 .NET 核心是不可行的。 Still, we no longer want to manage transitive dependencies, avoid problems with out-of-band packages , and so on.
尽管如此,我们不再想管理传递依赖,避免带外包的问题,等等。
Visual Studio 2019 has a migration assistant that can help us with moving our csproj files from packages.config to the format. Visual Studio 2019 有一个迁移助手,可以帮助我们将我们的 csproj 文件从 packages.config 移动到格式。 Unfortunately, the assistant does not support ASP.NET projects ;
不幸的是,该助手不支持 ASP.NET 项目; the main issue seems to be the web.config .
主要问题似乎是web.config 。
My gut feeling tells me that it would be a possibly a bad idea to move some projects to packageReference, while the ASP.NET application sticks to packages.config.我的直觉告诉我,将一些项目移动到 packageReference 可能是个坏主意,而 ASP.NET 应用程序则坚持使用 packages.config。 But are there also fact-based reasons against the mixed usage of packageReference and packages.config in one solution?
但是,是否还有基于事实的理由反对在一个解决方案中混合使用 packageReference 和 packages.config?
After we had run into problems after updating a transitive dependency of the RabbitMQ.Client NuGet package , we saw that we no longer want to actively manage the transitive dependencies.在更新 RabbitMQ.Client NuGet 包的传递依赖后遇到问题后,我们发现我们不再希望主动管理传递依赖。 At least for this very project, which is unfortunately part of the really large ASP.NET solution I mentioned in my question.
至少对于这个项目来说,不幸的是,它是我在问题中提到的真正大型 ASP.NET 解决方案的一部分。 So we went ahead and migrated one project to packageReference, leaving all other projects with packages.config.
因此,我们继续将一个项目迁移到 packageReference,将所有其他项目保留为 packages.config。 A little bit later, we migrated all the unit and integration test projects, and a few other projects.
稍后,我们迁移了所有单元和集成测试项目,以及一些其他项目。 Now we go with a "mixed solution" for two months or so.
现在我们采用“混合解决方案”两个月左右。 We did not experience any problems, and we went through the release lifecycle with that state.
我们没有遇到任何问题,我们以该状态经历了发布生命周期。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.