Can't find the 'create new website' of option in visual studio 2019 and 2022

Donald Symmons 2,856 Reputation points
2022-12-14T06:18:34.77+00:00

I recently downloaded visual studio 2019 and 2022 and new 2022 version 7.5; I wanted to be able to transfer my webform files images folder, Global asax file, and handler from the visual studio 2015 which existed in my computer to this newly downloaded visual studio but as I was about to create new, I was only able to find 'create new project' which only creates Web applications. But my work was created using the 'create new website'. I however got to create new project and transfered my aspx and aspx..cs(server side) files to the new project but got errors in my aspx.cs(server side) files. Most of the errors were "the name does not exist in the current context"; referring to labels and some other controls. But these controls exist; they are there in the client side. What could be the issue, and why is there no option to create website, except for creating new project?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,288 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lan Huang-MSFT 25,876 Reputation points Microsoft Vendor
    2022-12-14T07:53:00.457+00:00

    Hi @Donald Symmons ,
    I think you should check [Additional project templates] when downloading visual studio, so there is no Asp.net website template.
    You can refer to the following to modify.
    Regarding the context error issue, you are better off rewriting the code in a new project, rather than transferring the files directly.
    270444-image.png
    270417-image.png
    270445-image.png
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. 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 additional answers

Sort by: Most helpful