Class Library references
-
I created a Class library in a multi-project solution. This library is being referenced by many other libraries in different projects in the same solution. When I compile this library I would manually remove references to this library and then reference it again. Is there another way to do this?
-
I created a Class library in a multi-project solution. This library is being referenced by many other libraries in different projects in the same solution. When I compile this library I would manually remove references to this library and then reference it again. Is there another way to do this?
-
I created a Class library in a multi-project solution. This library is being referenced by many other libraries in different projects in the same solution. When I compile this library I would manually remove references to this library and then reference it again. Is there another way to do this?
The problem is probably because you are using automatic versioning in your Class library project. Open the Assembly.vb file and change the Assembly Version attribute from "1.*.*" (auto-increment versioning) to "1.0.0.0" or whatever you want for a version number. Then, all your other projects that reference this assembly will reference the same version of the assembly. In other words, your projects are referencing your Class assembly. When that reference is created, is it created with the version number of the last time you compiled the Class into an assembly. The '*'s in the Assembly version attribute of your Class project denote numbers where the compiler will automatically increment the version number. When your other projects that reference this assembly are run, they load the Class assembly with the same version that was used when the reference was created. If your app references your Class with the Class's version at 1.0.2039, then the app will always expect version 1.0.2039 to be there. Now, if you set a reference to the Class assembly, you'll run into the problem that your having now. If you create the reference to the Class project, the versioning problem will go away, but you'll still have to change the Assembly version of your Class project to a static number. Otherwise, when you compile your Class assembly, you'll have to recompile all the projects that reference it to. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
The problem is probably because you are using automatic versioning in your Class library project. Open the Assembly.vb file and change the Assembly Version attribute from "1.*.*" (auto-increment versioning) to "1.0.0.0" or whatever you want for a version number. Then, all your other projects that reference this assembly will reference the same version of the assembly. In other words, your projects are referencing your Class assembly. When that reference is created, is it created with the version number of the last time you compiled the Class into an assembly. The '*'s in the Assembly version attribute of your Class project denote numbers where the compiler will automatically increment the version number. When your other projects that reference this assembly are run, they load the Class assembly with the same version that was used when the reference was created. If your app references your Class with the Class's version at 1.0.2039, then the app will always expect version 1.0.2039 to be there. Now, if you set a reference to the Class assembly, you'll run into the problem that your having now. If you create the reference to the Class project, the versioning problem will go away, but you'll still have to change the Assembly version of your Class project to a static number. Otherwise, when you compile your Class assembly, you'll have to recompile all the projects that reference it to. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks. I finally got it.