We have a solution with a common class library that needs to be called from both a SQL Database project and a .NET Core 3.1 class library project in the same solution. The SQL Database project will be loaded into SQL Server 2017 as a CLR assembly so is targeting .NET Framework 4.7.2. Since the common class library is called from both .NET Core 3.1 and .NET Framework 4.7.2
it needs to target .NET Standard 2.0.
Everything compiles okay. However, if I close Visual Studio and reopen the solution it hangs. I can see messages saying that Visual Studio has loaded each of the projects. A message then appears saying "Preparing Solution..." and it seems to get stuck there indefinitely. I've tried waiting about 10 minutes and it never gets past that message.
This was in Visual Studio Pro 2022, v17.3.5. I tried opening the same solution in Visual Studio Pro 2019, v16.11.18, and Visual Studio Pro 2017, v15.9.23. The same thing happens - VS hangs on opening.
In case it was an issue specific to the various projects in the solution I tried creating a bare-bones solution in VS Pro 2019, just an empty SQL Database project referencing an empty .NET Standard 2.0 project. The same thing happened - compiled all right when I created it but VS 2019 hung when trying to reopen the solution.
Does anyone have any suggestions for fixing this issue?