I have inherited a vast web forms application that was auto generated from a classic asp site.
This has left .aspx pages with code embedded into them (No separate codebehind) Some attempts have been made to modernise and so some pages exist with C# code behind. These are mixed in the same folders as the pages with vb.net embedded.
I am having a go at getting the codebase into some kind of shape... and my first step was to move embedded code into a code behind... but I cannot as the compiler is expecting codebehind to be in C# and does not recognise the codebehind files I create (neither will Visual Studio combine the files in its GUI).
What steps can I take here? If I must pull c# files into separate folders I can do that, but I am not sure I could get a separate project working, it would change the deploy steps to much (I think)
The aim is to get the logic under some sort of test framework so I can work on re-factoring and safely making changes.
A single project must have a single language. (Folders are pretty much irrelevant, except for making sure you keep your namespaces correct.) But I've successfully created a separate C# project for a VB.Net aspx project with terribly intertwined code-in-the-page, as you are describing. The way I did it, that worked quite well, was to
Each project compiles into its own assembly (dll), and it is easy to call functions in one project from another. I didn't have trouble (that I remember anyway) with the deployment. And if your project is "vast" and contains many folders, it probably should be broken into separate projects anyway. Good luck! :)