How to run asp.net web application using visual studio code ?

ahmed salah 3,216 Reputation points
2024-12-24T21:40:42.5133333+00:00

I work on .NET 4.7. I have an issue: I can't run applications in Visual Studio Code. I don't know how to run it.

Startup page is

http://localhost:22851/WebPages/loginT.aspx

This page opens in Visual Studio 2019, but how to open the page logint.aspx in Visual Studio Code?

Project contains aspx web pages and asx user controls.

Visual Studio Code version is 1.96.2

Screenshot of the app

visual studio code project

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,547 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,152 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 68,486 Reputation points
    2024-12-24T23:42:14.1166667+00:00

    Other than editing, visual studio code has little support for the 4.* framework (no debug support). you can use a vscode task to run the msbuild of the project

    https://code.visualstudio.com/docs/editor/tasks

    You can use the launch file to start IIS or IIS express

    https://marketplace.visualstudio.com/items?itemName=warren-buckley.iis-express

    0 comments No comments

  2. XuDong Peng-MSFT 10,841 Reputation points Microsoft Vendor
    2024-12-25T03:36:44.36+00:00

    Hi @ahmed salah,

    I work on .NET 4.7. I have an issue: I can't run applications in Visual Studio Code. I don't know how to run it.

    Unfortunately, I'm not very familiar with Visual Studio Code, but based on the relevant documentation, I think your needs may not be achieved.

    First, you need to add C# support in VS code by installing C# Dev Kit extension, but the C# Dev Kit not support .NET Framework projects. Simply refer to this FAQ of C# Dev Kit: The Solution Explorer reports that my project is not supported in C# Dev Kit. In summary, I recommend that you use Visual Studio to run your project, which provides a more convenient environment for .NET Framework projects.

    Best Regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.