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.
Asked
Active
Viewed 2,040 times
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 Answers
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:
(it actually opens two pages). So close the above form, and then you get this:
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:
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).

Albert D. Kallal
- 42,205
- 3
- 34
- 51
-
"ensuring that previous (legacy) templates are also installed" - how is this done, and which templates do I need? – Tims Oct 27 '22 at 09:27
-
1See my edit - I show which options to install in my edit above. – Albert D. Kallal Oct 29 '22 at 15:30