Can't get rid of references

G

Guest

I have converted a vb6 dll into vb.net and gone through all of the code and
changed it to .net format. I have attempted to get rid of all Interop code
so that the dll will compile with only .net classes. I still have Interop
assemblies referenced and I do not know how to locate the code that is
preventing me from removing them from my application. Any assistance is
truly apprreciated.
 
M

Marina Levit [MVP]

Code preventing you from removing them? Huh?

What do you mean you "can't" get rid of the references? You just select the
reference and remove it.
 
C

Cor Ligthert [MVP]

Charlie,

Have a look in the Solution Explorer (mostly at the right side of your
screen docked), click on tab ot that Show All files and click than at
references, that is the place where you see them.

I hope this helps,

Cor
 
G

Guest

When I click on the reference and click the Remove menu item nothing happens.
The reference stays there. I am assuming that the reason I cannot get rid
of the reference is that there is code that still requires it. If this is
not true then why would the references not be removable?
--
Charlie Jursch
Patotech Software, Inc.
Danville, CA


Marina Levit said:
Code preventing you from removing them? Huh?

What do you mean you "can't" get rid of the references? You just select the
reference and remove it.
 
M

Marina Levit [MVP]

No, the IDE doesn't lock references just because code somewhere requires it.
It will let you remove the reference, and then your code just won't compile.

I haven't worked too much with the properties window in 2005 as far as
references. You can follow Cor's instructions on how to see the list of
references in Solution Explorer (which is the way I do it as well). Then you
can select the reference and hit the Delete key, or right click on it and
delete it that way.

Charlie J said:
When I click on the reference and click the Remove menu item nothing
happens.
The reference stays there. I am assuming that the reason I cannot get rid
of the reference is that there is code that still requires it. If this is
not true then why would the references not be removable?
--
Charlie Jursch
Patotech Software, Inc.
Danville, CA
 
H

Herfried K. Wagner [MVP]

Charlie J said:
I have converted a vb6 dll into vb.net and gone through all of the code and
changed it to .net format. I have attempted to get rid of all Interop
code
so that the dll will compile with only .net classes. I still have Interop
assemblies referenced and I do not know how to locate the code that is
preventing me from removing them from my application. Any assistance is
truly apprreciated.

If the tips given by the others do not work, backup the project file (VBPROJ
file), open it in notepad and remove the reference there. When opening the
project afterwards you may have to fix the lines which are relying on the
reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top