DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 16 Aug 2007 17:59:21 -0700,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    GT


Assembly version of assemblies with identical names   
Hello

I have a Windows.Forms application MyApp.exe running in kiosk mode on 
Windows CE, and I want to replace this .exe file with a new version located 
on a USB hard disk.
The file on the USB hard disk is also named MyApp.exe and has the same 
assembly name, but a different assembly version.
Before replacing the running MyApp.exe I want to make sure that the 
MyApp.exe file on the USB is indeed a new version. I have tried to use the 
AssemblyName.Version property for this purpose, but it seems that since the 
assembly name of the running .exe file is identical to the assembly name of 
the .exe file located on the USB, the version of the currently executing 
assembly (the running .exe file) is always returned. The code executed by the 
running MyApp.exe file is as follows: 

Assembly assem = Assembly.LoadFrom(sPathOfExeFileLocatedOnUSB); 
AssemblyName assemName = assem.GetName(); 
return assemName.Version.ToString(); 

How can i retrieve the assembly version of the .exe file located on the USB 
when the executing assembly has the same assembly name?

(This question is a continuation of the post "Replace running .exe file" of 
29 June)
Date:Thu, 16 Aug 2007 17:59:21 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us