Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared assembly version question 1

Status
Not open for further replies.

Becks25Not

Programmer
Jun 23, 2004
176
US
Hi All,

I have an Application that references a Shared Assembly as well as another assembly that references the same shared assembly. I added a function to the shared assembly. When I try to run, I get an error that the version the shared assembly other assembly is looking for cannot be copied into the bin. I can't rebuild the other assembly right now b/c it is being updated. Is there a way around this?

Thanks,
Becca
 
Thanks for responding Rick ... apparently that property is if the reference is to be located in the GAC. And I found an article on msdn showing this but the author just drew the picture ... never clarified on how to achieve this!!
 
Do you have the code for the shared assembly? Do you have multiple coders in the project?

We went through hell trying to figure out what was going on here with these kinds of issues last year. We were using file references in stead of project references, which is fine until you get 2 people using the same solution via Source Safe or other code tools. Even if you have the same file structure, the file references get all kinds of hosed. We found it was best if we used project references for anything that was being worked on and file references for the static libraries. The file references we ensured we had identical file structures for, and since they don't get recompiled in the solution, they don't screw with the references.

Another thing to check, are their circular references?

If Project A references Project B, and Project B references Procject C and Project C references Project A, very weird and bad things will happen.

And finally, when in doubt, create a new solution, bring in the projects one at a time and add the references.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Hi Rick,

Thanks for responding.

I have the code for the shared assembly ... I am the only coder; it's a really big project and I only work part time now.

I am having problems with the file references. I don't use Project B as a project reference because it is the employee info/log in/validation project. We have many shared projects like this.

Project A references the Shared Assembly v 1.2.1 and Project B
Project B references the Shared Assembly v 1.2.0

Thanks again!
Becca
 
ahh, that's going to cause an issue. running multiple versions of one assembly in one app is going to get messy.

Is there anyway to set the Proj A reference to the 1.2.0 version?

If not, you could try hard setting the version and build number of the 1.2.1 version to 1.2.0.

in your AssemblyInfo.cs file there should be a line like:

<Assembly: AssemblyVersion("1.2.*")>

try setting that to

<Assembly: AssemblyVersion("1.2.0.0")>


This would also be a wonderful time to point out to your manager(s) what a wonderful tool Source Safe is. Version management, expecially in branches like this is critical.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Hi Rick,

Thanks for responding.

I will give that a try!! Our mgmt doesn't understand that drawing a button on a form and making it do something are to different things!! :)

Thanks!
Becca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top