Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We have many VB.Net Windows Desktop apps in VB.Net. This particular one in 2015.

What we have been noticing over the past couple of months is that apps that have not changed when opened in VB are now getting errors like "Type 'SHDocVw.InternetExlorer' is not defined". Apparently the references can no longer be found???

In this case it relates to:
Dim WithEvents oauthBrowser As New SHDocVw.InternetExplorer()

which is getting the error.

Other apps with the same exact code (original code was copied years ago) and reference are NOT getting the error. Some also on VB.2015 and some on VB.2017.

This just doesn't make sense to me and for this app I cannot even figure out how to fix it. The 4 other apps do NOT have any references to Interop.SHDocVw or anything else related. I checked all the IMPORT statements, references and included namespaces and they are all the same.

So why is this happening and how to fix it?

Thanks

What I have tried:

Restarting VB.Net, Rebooting. Clean Project, Rebuild
Posted
Updated 3-Oct-19 5:21am
v2
Comments
Richard Deeming 3-Oct-19 9:08am    
Could be a 64-bit / 32-bit issue. I suspect you'll need to force the application to target x86 if you're going to reference the IE COM controls.
QuickBooksDev 3-Oct-19 10:17am    
All the apps are the same 32 bit. The app is several years old. So why would it fail now? It has also happened on other apps. But this one I can't figure out. They all get put into C:\Program Files (x86).

1 solution

Someone may have used the search and replace function of the IDE and replaced all occurrences, solution-wide, of Inter by Integer, which would lead to strange names such as IntegernetExplorer.

I would bet it's someone's misuse of search & replace function...
 
Share this answer
 
v4
Comments
Richard Deeming 3-Oct-19 9:37am    
That would be a "clbuttic" mistake. :)
phil.o 3-Oct-19 9:38am    
Clearly ^^
QuickBooksDev 3-Oct-19 10:15am    
Don't understand. The code is
Dim WithEvents oauthBrowser As New SHDocVw.InternetExplorer()
There is no IntegernetExporter in the solution. At least the find couldn't find it.

I am the only one who works on this app.


As a side note.
I agree what the VS Find/Replace leaves a lot to be desired. I have found that it can change modules that are generated like Designers, etc. There should be an option to only change modules that are user created not generated.

Also some times the code behind a form doesn't load properly and you don't know it. Find will not find anything in it. If you try to do a view code it comes up blank. You have to X out of the code and then redo the view code.
phil.o 3-Oct-19 10:54am    
Quoted from your own question:

What we have been noticing over the past couple of months is that apps that have not changed when opened in VB are now getting errors like "Type 'SHDocVw.IntegernetExlorer' is not defined". Apparently the references can no longer be found???
QuickBooksDev 3-Oct-19 11:19am    
The IntegernetExplorer was a typo entering the text. Sorry. It is as I copied and pasted InternetExplorer.

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