chapter ten

10 Adding Legacy Apps to Aspire and Working with AI Agents

 

This chapter covers

  • Upgrading from .NET Aspire 8 and 9 to Aspire 13
  • Adding existing .NET projects to Aspire
  • Moving existing infrastructure components to Aspire
  • Integrating Aspire with AI coding agents

So far, we covered how to build distributed applications with Aspire. We also looked at how to create deployment scripts for such applications and extend Aspire functionality. But all of these examples covered the evergreen Aspire 13.

However, Aspire has been production-ready since version 8 was released back in 2023. Version 9 was then released in 2024. And there are many systems in the wild that still use either of these versions. So, how do you modernize these systems and make them run on Aspire 13? This is what we will talk about in this chapter.

But this is not all. What if your application wasn’t on Aspire to begin with, even though it would have definitely benefited from being hosted on Aspire? There’s tooling available that makes adding existing applications to Aspire easy.

This includes adding the infrastructure components that you may have distributed all over your system, such as databases and message brokers. We will see how these can be easily converted into Aspire integrations while keeping the existing production versions intact.

10.1 Migrating old .NET Aspire projects

10.1.1 Migrating from .NET Aspire 8

10.1.2 Migrating from .NET Aspire 9 to Aspire 13

10.2 Enrolling existing projects in Aspire orchestration

10.2.1 Reconfiguring the infrastructure components

10.3 Integrating Aspire with AI coding agents

10.3.1 Configuring MCP in Aspire

10.3.2 Using agentic AI to work with Aspire

10.3.3 What is MCP and agentic tool calling

10.4 Closing thoughts

10.5 Summary