From: Terry Holland on 28 May 2010 10:47 This post is an attempt to find best practice for version control of assemblies in a solution with a view to installing them in the gac and have clients reference the correct version of a dll I have a solution that contains a number of projects (approx 25). One of the projects is my web application (TZ_WebApp) There are 4 console apps that run as scheduled tasks (TZ_Task1, TZ_Task2, TZ_Task3, TZ_Task4) There are a number of Windows Services (TZ_Service1, TZ_Service2, TZ_Service3, TZ_Service4) The above apps are currently installed on an iis server There is also a single winforms app that is installed on a number of client machines Each of the above apps references a core set of assemblies that encapsulates business logic, data access and a number of other core functions (TZ_BLL, TZ_DAL, TZ_Exceptions etc) They also reference MS Enterprise Libraries and some core .Net assemblies At present each of the apps that run on the iis server have a copy of all of the shared assemblies in there own program directories. In order to simplify updates we now want to install the core assemblies into the GAC on the server so that there is only one place where updates to our custom code need occur In order to enable this Ive added the following to each of the AssemblyInfo.VB files in my solution <Assembly: AssemblyVersion("1.14.*")> <Assembly: AssemblyKeyFile("\\MyServer\MyApp\SNK\TZKey.snk")> The references in my projects are added via the Projects tab on the Add Reference dialog. As I understand things, when I build my solution, any projects that have changed, would get a new version number (unchanged assemblies would keep the same version number as previous build) When I build my sultion, the build succeeds. When I attempt to run my application Im getting this error message Could not load file or assembly 'TZ_BLL, Version=1.14.3800.17235, Culture=neutral, PublicKeyToken=51d8ff5c9718d051' or one of its dependencies. The system cannot find the file specified. Im confused as to why my app is looking for version 1.14.3800.17235 as the version of TZ_BLL in its bin/debug dir is 1.14.3799.22542. Ive also done a search on the hdd for files called TZ_DLL and the only version I can find is 1.14.3799.22542. Can someone shed any light on what is happening here? What I have noticed is that if I go back to my solution and change <Assembly: AssemblyVersion("1.14.*")> to <Assembly: AssemblyVersion("1.14.0.1")> on my assemblies then the app runs. Also is I change back to <Assembly: AssemblyVersion("1.14.*")> then the app runs. Can any body explain this behaviour? Also, can someone explain or point me to decent resource on best practice for creating solutions where some assemblies are destined for GAC, and how best to manage to Version numbers of assemblies of a solution of the size I am working on Thanks in advance for any help Terry Holland
|
Pages: 1 Prev: Url Routing in ASP.NET 3.5 breaks AJAX Next: Code Signing in Visual Studio |