Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 26, 2005 06:12 PM by YugangW
Apr 21, 2005 01:08 PM|LINK
I am having a 'references' issue with a project that I converted from VS2003.
I have a separate solution that contains an application framework library. It compiles just fine in Beta 2. I also have another solution that contains Business objects (built from the framework library) and a Web project that uses the business objects.
I add a reference to the framework dlls to the business object projects and they compile fine. However, when I add a reference (project) to the business objects into the web project, I get the following errors when I build the web project:
"Reference required to assembly 'CSLA.Core.Bindablebase, Version=1.4.1936.29207, Culture=neutral, PublicKeyToken=28d6f679d0611304' containing type 'CSLA.Core.BindableBase', but a suitable reference could not be found due to ambiguity
between 'C:\Projects\CSLA\CSLA\bin\CSLA.Core.Bindablebase.dll', which is referenced by project 'Utility', and 'c:\windows\microsoft.net\framework\v2.0.50215\temporary asp.net files\toolbar\5da5b87a\_shadow\2de064ad\3117865280\29705720\csla.core.bindablebase.dll',
which is referenced by project '1_App_Code'. If both assemblies are identical, try replacing these references so both references are from the same location."
All the buiness objects point to the same version of the framework dlls, and I only receive the errors when I add the business object references to the web project. I've tried various combinations of adding/removing references and copy local true/false
and always end up with the same (or similar) error. It also appears that when I add the business objects assemblies into the web project, it automatically adds the frameworks assemblies (at least it is copying them to the web projects Bin directory). I didn't
see this in VS2003.
Any ideas on what I am doing wrong?
Apr 21, 2005 06:33 PM|LINK
Apr 22, 2005 12:52 AM|LINK
Can you provide more information about the structure of the number of visual studio solutions, the projects in each one, and the types of references in each one. I get an idea that you have 3 different visual studio solutions in play here -- is that right?
Also it seems you are not using project-to-project references, but instead referencing DLLs from a filesystem location. Let me know if that is accurate and we can look into it more.
Apr 22, 2005 01:21 AM|LINK
With mine I have a web site and a class library project in one solution. The class library has a file reference to a 3rd party class library. The web site references my class library and that pulls my dll plus the 3rd party dll into the bin folder of the
You can see more detail here:
and then more here:
Apr 22, 2005 03:45 AM|LINK
Thanks those posts help. One more question, if you don't build and browse the website (just view from IE without building), does it work? In other words is the error only appearing when you do build from the VS and the web app doesn't present the same
error at runtime?
Apr 22, 2005 12:25 PM|LINK
Apr 22, 2005 12:26 PM|LINK
I am having the exact same problem. Here is a breakdown of what my solution looks like:
At this point I get numerous similar errors to the one you mention regarding ambiguity between the DLLs. I have to say that the new project system is throwing me for a loop compared to VS.Net 2003. Perhaps I'm over-thinking it all.
Hopefully we'll get a solution to this.
Apr 22, 2005 03:02 PM|LINK
We are trying to narrow down the problem. It may be a bug in the Beta2 release. Can you try one more thing:
1) Remove the project reference to the class library in your web app
2) Add a file reference (browse to the DLLs and reference them) to the outputs of the class library project in your web project. The downside of this is that you will have to update (re-add) the file reference each time the class library changes. The alternative
also could be to not add a file reference, but to set the output folder of the class library to the \bin folder of the web project.
Let me know if these workaround suggestions fix the issue.
Apr 22, 2005 06:11 PM|LINK
Here's the only way I've found to fix it. I have to remove the class library project from the solution and then reference the .dll by browsing for it. This is acceptable for now, but definitely woud be a problem in the long-run. Thanks for any assistance.
Apr 22, 2005 07:11 PM|LINK