3

Image

After Installing Visual Studio Community 2022 version 17.3.4 I have tried to create new new project on asp .net web application(.NET Framework)(c#), but it is not working as you can see it constantly saying object reference not set to an instance of an object. I have tried to run it as administrator. I have done most of the things I have found on the internet but nothing seems to work.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
Akif Zaman
  • 51
  • 3
  • @ŇɏssaPøngjǣrdenlarp no, this is Visual Studio tooling throwing that exception. OP: just don't create new .NET Framework projects, use .NET 6. Have you tried updating/restoring Visual Studio? – CodeCaster Sep 25 '22 at 18:04
  • @CodeCaster I have repaired it and also reinstalled it completely but still does not work. – Akif Zaman Sep 25 '22 at 18:10
  • Make sure you install it as Admin, and that the path specified in the shot is a valid path that you have access to. Just as a precaution....Also, check the install .log file. Finally, try a different .NET Framework version. – NoChance Sep 25 '22 at 18:57
  • You can remove the hidden .vs folder in the project folder and re-launch your Visual Studio to check if the error disappears or not. – FUZIION Sep 26 '22 at 07:26

1 Answers1

2

Hum, I am running 17.3.4, and it works just fine.

I would consider doing a repair - see if that helps.

tools->get tools and features.

You get this:

enter image description here

(it actually opens two pages). So close the above form, and then you get this:

enter image description here

So, try the repair.

I suppose ensuring that previous (legacy) templates are also installed would help, but first try a repair.

Edit: Installing legacy templates

Ok, in comments it was asked what additional install(s) is one to select.

From VS menu tools->get tools and features.

You get/see this:

In above, expand the "ASP.NET and web development" on the right

this:

enter image description here

And then select these: (can't remember which exactly from above gets you everything, but given doing legacy development, good idea to select all that I pointed out).

enter image description here

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51