dotnet clr:
Say I have Foo.dll [Version 1.0.0.0, culture=null, public key token=ABC] Foo.dll [Version 2.0.0.0, culture=null, public key token=ABC] The second Foo.dll is a new major revision of the first Foo.dll. And I don't want to privately deploy these assemblies, so they do not go in the GAC. But I want to make both versions available to users. Are there conventions for how (i.e. in what directories) these two assemblies should be stored on a server, e.g. for no-touch deployment? Also, are there conventions for how (i.e. in what directories) these two assemblies should be stored on a client machine under the application's directory (i.e. in a directory or sub-directory of where c:\MyApp\Myapp.exe lives)? It seems like having different versions of the same assembly makes things more difficult, when you're not using the GAC. Do you have to create directory structures that have version numbers in them, for the purposes of storing the different versions of the assembly? Related question in a different scenario: If version Foo.dll 1.0.0.0 is downloaded from a web server into the download cache, and then, say, Foo.dll 2.0.0.0 overwrites Foo.dll 1.0.0.0 in the same location on the web server, the next time MyApp.exe references Foo.dll, will the download cache recognize that there is a new Foo.dll on the server, and download the new one into the download cache?
Hi Robert, If your assembly Foo.dll is strongly named then your application MyApp.exe will be able to reference and use only the assembly you used to compile. So, I don't understand very well what you mean with 'I want to make both versions available to users'. Do you mean that different applications will use different versions of your component? Thanks, Marcelo [quoted text, click to view] "Robert Myhill" <rmyhill@mathsoft.com> wrote in message news:e6WDtQKbDHA.2344@TK2MSFTNGP09.phx.gbl... > Say I have > Foo.dll [Version 1.0.0.0, culture=null, public key token=ABC] > Foo.dll [Version 2.0.0.0, culture=null, public key token=ABC] > The second Foo.dll is a new major revision of the first Foo.dll. > > And I don't want to privately deploy these assemblies, so they do not go in > the GAC. But I want to make both versions available to users. > > Are there conventions for how (i.e. in what directories) these two > assemblies should be stored on a server, e.g. for no-touch deployment? > Also, are there conventions for how (i.e. in what directories) these two > assemblies should be stored on a client machine under the application's > directory (i.e. in a directory or sub-directory of where c:\MyApp\Myapp.exe > lives)? > > It seems like having different versions of the same assembly makes things > more difficult, when you're not using the GAC. Do you have to create > directory structures that have version numbers in them, for the purposes of > storing the different versions of the assembly? > > Related question in a different scenario: If version Foo.dll 1.0.0.0 is > downloaded from a web server into the download cache, and then, say, Foo.dll > 2.0.0.0 overwrites Foo.dll 1.0.0.0 in the same location on the web server, > the next time MyApp.exe references Foo.dll, will the download cache > recognize that there is a new Foo.dll on the server, and download the new > one into the download cache? > > >
Hi Marcelo, Thanks for the reply. First, I should say that I made a typo in my first posting. It should say "And I do [I had said "don't"] want to privately deploy these assemblies, so they do not go in the GAC...". This re-wording obviously changes the intent of the message. So, the situation is that I have two versions of the same assembly (Foo.dll), and I want to privately deploy (i.e. not in the GAC) both versions of the assembly on a machine. Does this simply not make sense, since, as you say, MyApp.exe can only reference one of the assemblies anyway, since MyApp.exe would have been built against only version of the assembly? The above sounds correct if the code in MyApp.exe is doing Assembly.Load's. But, in theory, couldn't the code for MyApp.exe do: Assembly.LoadFrom:("C:\\MyApp\1.0\Foo.dll"); and also do Assembly.LoadFrom:("C:\\MyApp\2.0\Foo.dll"); (Where these are two different versions of the same Foo.dll assembly). Would this work, if I wanted the same application to simultaneously use two versions of the same assembly? Or, does the CLR not allow this. Thanks for your help. Robert [quoted text, click to view] "Marcelo Birnbach [MS]" <mbirnbac@online.microsoft.com> wrote in message news:eDGmlJbbDHA.880@TK2MSFTNGP09.phx.gbl... > Hi Robert, > > If your assembly Foo.dll is strongly named then your application MyApp.exe > will be able to reference and use only the assembly you used to compile. So, > I don't understand very well what you mean with 'I want to make both > versions available to users'. Do you mean that different applications will > use different versions of your component? > > Thanks, > Marcelo > > "Robert Myhill" <rmyhill@mathsoft.com> wrote in message > news:e6WDtQKbDHA.2344@TK2MSFTNGP09.phx.gbl... > > Say I have > > Foo.dll [Version 1.0.0.0, culture=null, public key token=ABC] > > Foo.dll [Version 2.0.0.0, culture=null, public key token=ABC] > > The second Foo.dll is a new major revision of the first Foo.dll. > > > > And I don't want to privately deploy these assemblies, so they do not go > in > > the GAC. But I want to make both versions available to users. > > > > Are there conventions for how (i.e. in what directories) these two > > assemblies should be stored on a server, e.g. for no-touch deployment? > > Also, are there conventions for how (i.e. in what directories) these two > > assemblies should be stored on a client machine under the application's > > directory (i.e. in a directory or sub-directory of where > c:\MyApp\Myapp.exe > > lives)? > > > > It seems like having different versions of the same assembly makes things > > more difficult, when you're not using the GAC. Do you have to create > > directory structures that have version numbers in them, for the purposes > of > > storing the different versions of the assembly? > > > > Related question in a different scenario: If version Foo.dll 1.0.0.0 is > > downloaded from a web server into the download cache, and then, say, > Foo.dll > > 2.0.0.0 overwrites Foo.dll 1.0.0.0 in the same location on the web server, > > the next time MyApp.exe references Foo.dll, will the download cache > > recognize that there is a new Foo.dll on the server, and download the new > > one into the download cache? > > > > > > > >
Hi! Yes, this will work perfectly fine. However, the question is that if v2.0 is a better version over v1.0, logically, why would you want to load both the versions. Also, remember that when you Assembly.LoadFrom, you dont have a compile time reference to the classes being consumed, and developing this way is kind of analogous to writing late bound code. Is that what you are looking for? -- Regards, Gaurav Khanna ---------------------------------------------------------------------------- ---------------- Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I WinToolZone - Spelunking Microsoft Technologies http://www.wintoolzone.com/ [quoted text, click to view] "Robert Myhill" <rmyhill@mathsoft.com> wrote in message news:ua4TWXibDHA.2632@TK2MSFTNGP09.phx.gbl... > Hi Marcelo, > > Thanks for the reply. > > First, I should say that I made a typo in my first posting. It should say > "And I do [I had said "don't"] want to privately deploy these assemblies, > so they do not go in > the GAC...". This re-wording obviously changes the intent of the message. > > So, the situation is that I have two versions of the same assembly > (Foo.dll), and > I want to privately deploy (i.e. not in the GAC) both versions of the > assembly on a machine. > Does this simply not make sense, since, as you say, MyApp.exe can only > reference one of > the assemblies anyway, since MyApp.exe would have been built against only > version of the > assembly? > > The above sounds correct if the code in MyApp.exe is doing Assembly.Load's. > But, in theory, > couldn't the code for MyApp.exe do: > Assembly.LoadFrom:("C:\\MyApp\1.0\Foo.dll"); > and also do > Assembly.LoadFrom:("C:\\MyApp\2.0\Foo.dll"); > > (Where these are two different versions of the same Foo.dll assembly). > Would this work, if I wanted the same application to simultaneously use two > versions of > the same assembly? Or, does the CLR not allow this. > > Thanks for your help. > > Robert > > > > > "Marcelo Birnbach [MS]" <mbirnbac@online.microsoft.com> wrote in message > news:eDGmlJbbDHA.880@TK2MSFTNGP09.phx.gbl... > > Hi Robert, > > > > If your assembly Foo.dll is strongly named then your application MyApp.exe > > will be able to reference and use only the assembly you used to compile. > So, > > I don't understand very well what you mean with 'I want to make both > > versions available to users'. Do you mean that different applications will > > use different versions of your component? > > > > Thanks, > > Marcelo > > > > "Robert Myhill" <rmyhill@mathsoft.com> wrote in message > > news:e6WDtQKbDHA.2344@TK2MSFTNGP09.phx.gbl... > > > Say I have > > > Foo.dll [Version 1.0.0.0, culture=null, public key token=ABC] > > > Foo.dll [Version 2.0.0.0, culture=null, public key token=ABC] > > > The second Foo.dll is a new major revision of the first Foo.dll. > > > > > > And I don't want to privately deploy these assemblies, so they do not go > > in > > > the GAC. But I want to make both versions available to users. > > > > > > Are there conventions for how (i.e. in what directories) these two > > > assemblies should be stored on a server, e.g. for no-touch deployment? > > > Also, are there conventions for how (i.e. in what directories) these two > > > assemblies should be stored on a client machine under the application's > > > directory (i.e. in a directory or sub-directory of where > > c:\MyApp\Myapp.exe > > > lives)? > > > > > > It seems like having different versions of the same assembly makes > things > > > more difficult, when you're not using the GAC. Do you have to create > > > directory structures that have version numbers in them, for the purposes > > of > > > storing the different versions of the assembly? > > > > > > Related question in a different scenario: If version Foo.dll 1.0.0.0 is > > > downloaded from a web server into the download cache, and then, say, > > Foo.dll > > > 2.0.0.0 overwrites Foo.dll 1.0.0.0 in the same location on the web > server, > > > the next time MyApp.exe references Foo.dll, will the download cache > > > recognize that there is a new Foo.dll on the server, and download the > new > > > one into the download cache? > > > > > > > > > > > > > > >
Don't see what you're looking for? Try a search.
|