c# - Why the versions of the assemblies are the same? -


We have an application that looks at the shared folder for the new version of the application.

We have come up with the following code to check whether the versions of the assemblies are different (running on the client, and one of the server's shared folders)

 < Get current version of code> // Entry Assembly versaoAtual =. Assembly.GetEntryAssembly () getName () version. / Server string arquivoServidor = Path.Combine (maquinaCliente.DiretorioDeploy, @ "SameDigital.Client.exe" on the path to new assembly in a shared folder); // If the file does not exist, the version is the same, so it will not be updated (! File.exis (arquiosvervideo)) {versaoNova = versaoAtual; } Else {// creates a temporary AppDomain to load the server assembly AppDomain ad = AppDomain.CreateDomain ("TempAppDomainSameDigitalClient"); // Server assembly receives the version of versaoNova = ad.Load (file. Read AllBytes (arquivoServidor)). GetName () Edition; // Load the temporary AppDomain AppDomain. Advertising (Advertising); }  

But the results are not expected, both variables display the same version (actually running version). Should not it work? As we are acquiring the version of the ongoing assembly and then loading another assembly and getting the version of this.

Can anyone please clarify what we are doing wrong?

Thanks in advance.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -