[英]How can I slowly migrate a project from ASP .NET WebForms with VB .NET to MVC C#?
At the moment I have a legacy website written in vb .net and web forms. 目前,我有一个以vb .net和Web形式编写的旧网站。 Its about ten years old.
它大约十岁了。 I want to start to migrate components of it over to C# MVC.
我想开始将其组件迁移到C#MVC。
My plan is to create a separate project in the solution in C# with .NET MVC, and do all the controller code etc in there. 我的计划是使用.NET MVC在C#解决方案中创建一个单独的项目,并在那里执行所有控制器代码等。 I would need to wire up routing etc from the vb.net project though, into this project.
我需要将路由等从vb.net项目连接到该项目中。 Eventually over time the plan is to migrate the entire project over to C# with .NET MVC.
最终,随着时间的推移,计划将使用.NET MVC将整个项目迁移到C#。
The app uses forms auth (albeit a bit of a hacky implementation of it), so if someone logs into the legacy app, their authentication should also be recognised in the "new" project/system. 该应用程序使用表单身份验证(尽管有点hacky实现),因此,如果有人登录到旧版应用程序,则还应在“新”项目/系统中识别其身份验证。
How would I do this? 我该怎么做?
EDIT: There is stuff taped into code behind en masse (mainly on row data bound etc for gridview formatting) plus a gigantic class that does absolutely everything. 编辑:有大量东西被粘贴到代码中(主要是在网格视图格式的行数据绑定等上)加上一个可以绝对完成所有工作的巨型类。 Architecturally its about as bad as you could hope for.
从结构上讲,它和您希望的一样糟糕。
As an initial step, you can convert your VB project into C# using SharpDevelop. 首先,您可以使用SharpDevelop将VB项目转换为C#。 They have independent IDE and also Visual Studio plugin.
他们有独立的IDE和Visual Studio插件。
即使您声明由于时间限制您没有时间开始新项目,这也是最好的方法,因为与开发新项目相比,您将花费更多的时间转换代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.