GitHub Copilot. Migrating Asp.Net - Web Forms App to Blazor. Attempt 1
Автор: Codeless Developer
Загружено: 2025-11-17
Просмотров: 41
Описание:
GitHub Copilot in Visual Studio 2026. Converting old .Net Framework WebForms application to the more modern Blazor
*Converting ASP.NET WebForms to Blazor Using GitHub Copilot – My Full, Honest Experience*
In this video, I attempt something ambitious*: using **GitHub Copilot* to fully convert an *ASP.NET WebForms (.NET Framework)* application into the *latest ASP.NET Blazor Server* project.
As a developer with almost no real Copilot experience, I went into this process with extremely high expectations—especially considering the WebForms application is small, well-structured, and uses common design patterns.
If you want to see how to get started with GitHub Copilot in **Visual Studio 2026**, watch my separate video. The setup is very simple as long as you already have a GitHub account.
*Getting Started with Copilot*
• Github Copilot. Getting Started in Visual ...
---
*About the Existing Application*
The original solution is a classic *.NET Framework WebForms* project that:
✔ Has one main page that creates a product and saves it to a database
✔ Uses a *User Control* for most of the form
✔ Uses a *Master Page* for layout
✔ Has clean separation of layers:
WebForms front-end
A Data Access layer using *Entity Framework 6*
A Composition Root project using *Autofac* (because WebForms has no built-in DI)
Integration tests running against a real database
I expected Copilot to be able to handle most of the migration—especially the EF6 to EF Core changes.
---
*The Migration Plan / Prompt*
Here is the exact prompt I gave Copilot:
“Given this solution that was created in ASP.NET WebForms, convert it to the latest ASP.NET Blazor Server.
• Keep C# code in code-behind where possible
• Use the latest versions of Entity Framework
• Use the appropriate version of AutoFac for dependency injection”
I also emphasized the importance of *source control* and having both a backup and a clean branch before starting.
---
*Copilot Agent Mode – The Reality*
On my very first attempt, I quickly realized I had to use **Agent Mode**.
This allows Copilot to directly edit files across the solution instead of relying on copy/paste.
Sounds great in theory… but here’s what really happened:
● Copilot was very slow
● Lots of back-and-forth questions
● Barely any progress after 10 minutes
● Most projects remained on .NET Framework
● It attempted a Blazor migration—but only to **.NET 8**, not the latest version
● It couldn’t modify solution-level files while the IDE was open
● I eventually had to unload every project manually just to proceed
● Endless rebuilds and test runs slowed everything down
● After 3 hours, it still hadn’t migrated the WebForms project or moved the connection string
● After 4 hours, the solution finally compiled—but the Blazor project was still missing entirely
The good news?
✔ Integration tests still passed
✔ Supporting projects upgraded cleanly
✔ NuGet packages stayed at previous versions to prevent breaking changes
But ultimately…
---
*Conclusion: My First Attempt Failed*
Despite all the effort, Copilot *could not* successfully migrate even this simple WebForms app to Blazor in its first attempt.
The WebForms project simply stayed WebForms.
The rest of the solution upgraded, but the core goal failed.
---
*What’s Next?*
I will create another video where I repeat the entire migration **but this time I will manually create the Blazor project first**, since Copilot may have selected the wrong Blazor template.
Grab your popcorn, chips, sweets, and cooldrink—because this experiment did not go as expected… but it was very educational.
---
*Timestamps (Add later after upload)*
00:00 - Intro
00:43 - WebForms App
04:04 - Prompt to Copilot
05:15 - The Failure
07:57 - 3-4 Hrs - Nothing
09:00 - Conclusion
---
--
*Getting Started with Copilot*
• Github Copilot. Getting Started in Visual ...
*Keywords*
asp.net webforms to blazor migration, migrate .net framework to blazor, github copilot agent mode, visual studio 2026 copilot, entity framework 6 to ef core, autofac .net 9, webforms conversion tutorial, blazor server upgrade, copilot developer experiment, ai code migration, migrate legacy .net framework app
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: