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.
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.
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
web site.
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?
I was able to run the site using the built-in web server with no issues.
However, this led me to another possible problem. I first tried to run
the site via IIS (http://localohost/site) and got an error parsing the
web.config file so I checked IIS and I don't see the tab that allows you
to choose the ASP.NET version the site uses like we had in prior builds.
Any ideas on that one or should I create a new post?
I am having the exact same problem. Here is a breakdown of what my solution looks like:
I have an ASP.NET 2.0 beta 2 web application project. (project 1)
I add VS.Net 2003 project to the solution and go through the Conversion process. No errors. (project 2)
I then reference the project 2 project from project 1
I configure the dependency of project 1 on project 2
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.
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.
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.
tcochran64
Member
15 Points
3 Posts
Assembly Reference issue with Beta 2
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?
Thanks,
Tim
ChrisWallace
Member
55 Points
11 Posts
Re: Assembly Reference issue with Beta 2
Apr 21, 2005 06:33 PM|LINK
omar_k
Participant
1098 Points
214 Posts
Microsoft
Re: Assembly Reference issue with Beta 2
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.
Visual Web Developer Team
wolfcw1
Member
260 Points
52 Posts
Re: Assembly Reference issue with Beta 2
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 web site.
You can see more detail here:
http://tamasii.com/blog/archive/2005/04/20/48926.aspx
and then more here:
http://tamasii.com/blog/archive/2005/04/21/48929.aspx
omar_k
Participant
1098 Points
214 Posts
Microsoft
Re: Assembly Reference issue with Beta 2
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?
Visual Web Developer Team
ChrisWallace
Member
55 Points
11 Posts
Re: Assembly Reference issue with Beta 2
Apr 22, 2005 12:25 PM|LINK
However, this led me to another possible problem. I first tried to run
the site via IIS (http://localohost/site) and got an error parsing the
web.config file so I checked IIS and I don't see the tab that allows you
to choose the ASP.NET version the site uses like we had in prior builds.
Any ideas on that one or should I create a new post?
junior8822
Member
186 Points
40 Posts
Re: Assembly Reference issue with Beta 2
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.
John Walker
omar_k
Participant
1098 Points
214 Posts
Microsoft
Re: Assembly Reference issue with Beta 2
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.
Visual Web Developer Team
junior8822
Member
186 Points
40 Posts
Re: Assembly Reference issue with Beta 2
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.
John Walker
wolfcw1
Member
260 Points
52 Posts
Re: Assembly Reference issue with Beta 2
Apr 22, 2005 07:11 PM|LINK