I am struggling with understanding why my legacy .csproj doesn’t get loaded in Visual Studio 2022.
I have solution with 100 csprojects, all of them target .NET 4.7, two of the projects are asp.net webforms/webservice projects.
Everything is fine and working on Visual Studio 2019 on Win10.
I have issues with 2019 studio performance and decided to try Visual Studio 2022, installed it on the same machine, and when opening the solution, all of the projects load except one which is asp.net project – it doesn’t load. When trying to reload I receive:
and unfortunately nothing more.
I am curious in finding why this happens, but the error itself doesn’t give enough information to find something.
What I was able to find that this might be some COM component issue, but thats all.
Can someone give some ideas on how to proceed with this?
running devenv with /Log flag doesn’t show any description of loading project error.
2
Answers
I found the cause of the issue by trying to find guids in the csproj, remove them one by one and then trying to reload the project.
These were two item groups which cause the issue, after removing them, the project was loaded OK.
After googling the guids and looking into the project, it seems that the issue is with Crystal Reports which are used in the project.
Its a shame VS doesn't include guid or some context for the error.
Currently I have removed those item groups and everything seems to work OK, so far.
In a meanwhile I found there is a special version of crystal reports for VS 2022, will try it later, I found the info here: https://userapps.support.sap.com/sap/support/knowledge/en/3204647 https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads http://downloads.businessobjects.com/akdlm/crnetruntime/clickonce/CRRuntime_32bit_13_0_21.msi
Ok, with some screen shots, we have a wee bit more info.
Try forcing that project to x32, and do a re-build all of that ONE project. That x800 errors often suggests/hints at a bit size miss-match. (in other words, that project has some assembly references that are x32 bits). Also, check the references – are some missing?
So, see/try if you can build by forcing that project as x32 bits. As you note, it build’s in vs2019, but not vs2022 – and as I noted, vs2022 is a x64 bit product, and that what’s different here.
In fact, open the project in vs2019, force to x32 bits, do a re-build of that one project.
Now, try opening in vs2022, does it load and/or build?