When I open an ASPX (ASP.NET Web Forms) file with embedded server-side code in Visual Studio Code, I am getting a lot of error highlights.
Here is a very minimal example:
Is there an extension I should have installed (I did install the C# extension) or is this an unsupported scenario? Or am I just really messing up here?
Right-click the . aspx page, and then click View Code. The code-behind file opens in the editor.
aspx. cs file) must first be compiled. This compilation can happen explicitly or automatically. If the compilation happens explicitly then the entire application's source code is compiled into one or more assemblies ( .
Select the Visual C# -> Web templates group on the left. Then, select Web Form from the middle list and name it FirstWebPage. aspx. Click Add to add the web page to your project.
VSCode is built to support .NET Core apps. .NET Core does not support ASP.NET Web Forms (and they probably never will). As noted correctly it is evaluated as HTML instead now.
That said, I don't think the issue in particular is VSCode, but more the compiler that isn't implemented to support Web Forms. I guess they just left out support for the ASPX syntax out of VSCode for that reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With