Even after repairing, then uninstalling & reinstalling, when I create a new project with Visual Studio 2022 (which I just downloaded yesterday -- have been using Visual Studio 2017 until then), then go to Project
> {project name} Properties
> Compile
, I get the error
An error occurred trying to load the page. Object reference not set to an instance of an object.
This occurs with every project I've created -- all of which are created using the button on the opening screen "Create a new project" > Windows Forms App (.NET Framework).
Things that have been tried without effect:
- running the program using "Run as Administrator"
- deleting the files shown in this answer
- repairing the Visual Studio installation (and restarting the computer)
- uninstalling and reinstalling Visual Studio (and restarting the computer)
- adding some code, saving, and running the project (which as a basic "Hello World" project runs fine) before going to Properties
- going to Properties before adding any code
- This thread -- it's about ASP.net, shows a different error (that thread has a pop-up error; mine is simply in the page itself, as shown below), and basically suggests a solution of (a) reinstall -- done that, and (b) some things specific to ASP.net that don't apply in my case.
Other info that may or may not be relevant:
- I'm running on Windows 7 (while VS 2022 has some advertised limitations while running on Windows 7, this isn't one of them... and I don't intend to switch to Windows 10)
- ample disk space available (hundreds of GB)
- Various .NET frameworks produce the same error; generally using 4.7.2
- Visual Studio Community 2022 (64-bit), Version 17.4.4
Screenshot:
The info copied from the "About Microsoft Visual Studio" info from the Help menu is:
Microsoft Visual Studio Community 2022 Version 17.4.4 VisualStudio.17.Release/17.4.4+33213.308 Microsoft .NET Framework Version 4.8.03761
Installed Version: Community
ASP.NET and Web Tools 17.4.326.54890 ASP.NET and Web Tools
Azure App Service Tools v3.0.0 17.4.326.54890 Azure App Service Tools v3.0.0
C# Tools 4.4.0-6.22608.27+af1e46ad38d900023f8b1a2839484e471ece1502 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
NuGet Package Manager 6.4.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
TypeScript Tools 17.0.10921.2001 TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools
4.4.0-6.22608.27+af1e46ad38d900023f8b1a2839484e471ece1502 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.Visual F# Tools
17.4.0-beta.22512.4+525d5109e389341bb90b144c24e2ad1ceec91e7b Microsoft Visual F# ToolsVisual Studio IntelliCode 2.2 AI-assisted development for Visual Studio.
I've searched on Stack Overflow and elsewhere for things to try, and nothing seems to fix the issue. The closest anything came was a Microsoft help forum where an MS employee gave somebody with a similar situation the advice "your Visual Studio installation may be corrupt, so you may have to repair or even uninstall/reinstall it" (sorry, lost the link). And I tried each of those, but the issue persists.
What can be done to remove this error message and access the Compile settings from a project's Properties?