Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I ran Norton utilities on my windows 10 PC. After completing VS 2017 would not load. Message was stale license. Tried link to update license with message it failed. Uninstalled it. Installed VS 2019 Community. Same problem. Uninstalled it and installed VS 2022 on advice of MS. Loaded windows app built with VS 2017. Lots of problems. Lost some of my personal library references. Added them back. But one of them failed to load. Stuck here.

Other functions have problems, too. Norton help is too busy.

Fortunately, my laptop is functioning with VS 2019 Community. I cleaned it with Norton, too. But did not clean the register like with the desktop with all the problems. Below is the message when starting a project. The project loaded, but failed to execute.

Message=Could not load file or assembly 'PressureVesselLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=HoSep2015




Any suggestions?

What I have tried:

Tried uninstalling and re-installing without success.
Posted
Updated 8-Mar-23 12:43pm
Comments
Member 15627495 8-Mar-23 13:36pm    
"reset" your Windows 10 , with 'refresh Os' option ... ( keep your file and settings )
it seems it's too late for the whole.
BobbyStrain 8-Mar-23 13:43pm    
I don't understand your comment.
Richard MacCutchan 8-Mar-23 14:34pm    
Try going back to the last good restart point.
BobbyStrain 8-Mar-23 16:22pm    
Unfortunately I never set up a backup. And I can't register my libraries for COM. Can't find an entry point.
BobbyStrain 9-Mar-23 19:57pm    
I do seem to have an automatic restore point. It shows up in Norton Utilities which caused all the headaches. Turns out I now have lots of stuff that no longer works. It's almost impossible to get Norton for advice. There is a restore option in the utilities, but I am reluctant to use it until I can talk to Norton.

1 solution

Quote:
Could not load file or assembly 'PressureVesselLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

This screams to me that you're trying to use a 32-bit library in a 64-bit app, or the other way around. You cannot combine 32- and 64-bit code in the same process.

If the library is 32-bit only, go into your project properties, Build tab, and set the Platform Target to x86. If the library is 64-bit, go to the same place and set the target to x64.

If the library .DLL you referenced in this project isn't where it's supposed to be, Norton may have quarantined it.
 
Share this answer
 
v2
Comments
BobbyStrain 8-Mar-23 20:01pm    
Thank you. There is no problem with it working on my laptop with windows 10, too. It uses VS 2019. The library registered before, too to use with Excel. After the Norton damage it has stopped working. I will try your suggestion. I will remove VS 2022 from the problem PC and work with VS 2019 on my laptop. And I am cancelling my Norton subscriptions.
BobbyStrain 11-Mar-23 23:20pm    
Dave, all the problems were caused by Norton Utilities. Running its cleanup wreaked havoc with lots of things. Among them was VS 2017 would not load. That's when I uninstalled it an installed VS 2022. And the problem occurred here. After trying lots of stuff to correct the problem I had no success. Then I found a program called REVO. I uninstalled VS 2022 with it. Then successfully installed VS 2019 Community. My project now works fine; no problem loading the library. I suspect that all attempts before using REVO left behind some corrupted file when I installed VS 2022. Several other applications were also wrecked. REVO remedied that on one application. I uninstalled Office 2007 and installed Office 2019 that cost $20. I don't yet know what damage is lurking. Thanks again for your help.
BobbyStrain 14-Mar-23 11:29am    
I spoke too soon. The library is no longer a problem. But there is an image which invokes the following: "A generic error occurred in GDI+". And the project won't load. But the project works fine on my laptop. There are other images on the forms and they give no problem. So, there is still some corruption. The image is loaded into a PictureBox. I deleted it and tried a Label with the image. Same result. I found lots of discussion on the web, but no solutions. Seems that all the problems are some corrupt file. Since it works without the image, I may still be able to use my desktop for building projects.
Dave Kreskowiak 14-Mar-23 11:31am    
Then there's a problem with an image file. You'll have to figure out which file it is and replace it.

BobbyStrain 14-Mar-23 12:29pm    
Dave, I know which image it is. But it has worked for 15+ years. And still works on my laptop with VS 2019. I cleaned my laptop with the same Norton Utility. Except I did not clean the register. I have lots of images where the faulty one comes from, and I replaced the image with a different one from the same place. And it caused the same error. I tried another that I built and it worked OK. It's still a puzzle. I believe there is still a corrupted register entry left from the Norton fiasco.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900