Unable to add Reference

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a VB.Net solution with 2 projects. The first
project should reference the second. I'm able to see the
second project on the Projects tab and I'm able to click
the OK button to successfully add the reference.

The problem is that the reference does not appear under
the Reference list of project 1. Project 2 also does not
appear in ILDASM for project 1.

What could cause a project to not be added as a reference
without generating an error?
 
Hello Dave,

Thanks for your post. As I understand, you have 2 projects in a VB .NET
solution, one adds reference to another, however, this reference does not
appear in the list of project 1. Please correct me if there is any
misunderstanding. Generally speaking, it will prompt an error message if it
cannot add a reference to another project.

I suggest that you can access classes of Project 2 in the code of Poject 1
to check whether it can be built and executed. If it works properly, I
believe that the project 2 is properly referenced. If not, I think more
information is needed before moving forward:

1. What are the types of projects in the VB .NET solution?
2. What's the version of Visual Studio .NET, 2002 or 2003?
3. Does this problem occur to only a specific solution or it occurs to
other solutions (say C#, etc)?

I look forward to hearing from you.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thanks for your response!

Yes, your understanding of the problem is correct.

Unfortunately, I cannot access classes in project 2 from
project 1 because the project was not registered and I
did not receive an error message. So, the project 2
classes do not appear in IntelliSense.

1. What are the types of projects in the VB .NET
solution?

Project 1 is Windows App (VB). Project 2 is a class
library (also vb).


2. What's the version of Visual Studio .NET, 2002 or
2003?

2003.


3. Does this problem occur to only a specific solution
or it occurs to other solutions (say C#, etc)

The problem is specific to project 2. I can reference
projects 3, 4, and 5 with no problem. In fact, if I
build a new project and add the same existing objects
(classes, assemblyinfo, etc...), there is no problem
referencing this new project. Something seems to
specifically be wrong with the Project 2 project.
 
Hi Dave,

Since the problem only occurs to a specific project/solution, could you
please post the projects which are reproduce the problem? I will be glad to
check it on my side.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
The problem is that the reference does not appear under
the Reference list of project 1. Project 2 also does not
appear in ILDASM for project 1.

Just a few thoughts:

Has Project 2 been built?
When you build the solution, are there any indications of failure in the
output window?

Chris
 
Hello Dave,

I'd like to share the following information with you:

1. As another project containing the same objects (classes,
assemblyinfo.vb, etc) with Project2 works properly, I suggest that you can
compare the files .vbproj and .vbproj.user of both projects in Notepad and
check whethere there is any differences that may cause this problem.

2. You can also make a copy of Project, remove a class or a function at a
time until it starts working again.

3. If the problem still persists, you can post the project or contact me at
(e-mail address removed) directly. It's my pleasure to be of assistance.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Is my face red. The project that was causing problems
was created by copying it from another project.
Unfortunately, the guid from the original project
remained unchanged in the .VBProj file.

After changing the guid, everything works fine. Thanks
for all the help!!!
 
Back
Top