简体   繁体   English

将 packageReference 和 packages.config 混合在一个解决方案中?

[英]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.

相关问题 可以删除MVC Packages.config - MVC Packages.config can be removed 如何在缺少Web.config和packages.config文件的情况下运行ASP.NET Web窗体应用程序? - How to run an ASP.NET web forms application with missing Web.config and and packages.config files? 一个解决方案中的多个Web项目,配置转换 - Multiple Web Projects in one solution, Config Transforms Visual Studio 2015中的解决方案资源管理器菜单缺少jspm软件包和config.js - Solution explorer menu in Visual Studio 2015 is missing jspm packages and config.js 在一个设置中混合使用Azure和AWS - Mixing both Azure and AWS in one setup 哪一个是更好的解决方案? - which one is a better solution? 基于解决方案配置的web.config转换 - web.config transformation based on solution configuration 在解决方案中为多个站点共享Web.Config - Sharing Web.Config for multiple sites in solution 多项目解决方案中的通用配置文件? - Common config file in a multiple-project solution? 如何在 Visual Studio 2015 中的一个解决方案中跨多个 ASP.NET CORE 项目共享 appsettings.json 等配置文件? - How can I share config file like appsettings.json across multiple ASP.NET CORE projects in one solution in Visual Studio 2015?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM