Reputation: 728
I have a Web application project that references other projects within the same solution. I wanted the web application to reference the same project but from a static folder in a different solution.
something like this:
Solution A ---> ---->Web App ------>Reference to proj
Solution B-----> ------->Web App ------->Reference proj1.dll (static)
I would appreciate any help and suggestions.
Thank you.----
Upvotes: 0
Views: 186
Reputation: 728
I fixed the problem by using Conditions in the vbproj.
something like this: < ItemGroup Condition=" '$(Configuration)|$(Platform)' != 'Developers|AnyCPU' "> < ProjectReference Include="..\xxxx"> </ProjectReference > ........
< /ItemGroup> < ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Others|AnyCPU' "> < Reference Include="Foo, Version=1.0.0.0, Culture=neutral, ProcessorArchitecture=MSIL"/> .......... < /ItemGroup>
~ Hope it helps someone else.
Upvotes: 1
Reputation: 645
Basically the SLN file is just meta data defining the location of references, projects, and other meta data about the solution. A project can easily be added to multiple solutions.
Now the project belongs to both solutions. Changes to the project in either solutions will effect the project in the other solution since they are the exact same project files.
Upvotes: 0
Reputation: 9653
Either add that project to Solution B too (add existing project) or right click References, select Add Reference and browse for the compiled DLL. It doesn't have to live in the solution folder structure.
Upvotes: 0