|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Build Date from ClickOnce Assembly?Hi,
How can I knwo the BuildDate from an application distributed by ClickOnce? When I use "System.IO.File.GetLastWriteTime(objAssembly.Location)" or "System.IO.File.GetCreationTime(objAssembly.Location)" it returns me the date and time that the user downloaded and isntaled the application, butn ot the date it was published... Thansk a lot in advance, Pieter PS: It should work also for .NET 1.1 applications... Someone else could perhaps have a better solution but :
- my personal preference is to use the deployment version - you also have the automatic versionaing that is based on the current date/time. So either use this or convert it back to the date. Finally googling gives me : http://www.codinghorror.com/blog/archives/000264.html (in partriuclar reading the build date from the PE file). "Pieter" <pieterNOSPAMcoucke@hotmail.com> a écrit dans le message de news: %23nzfv2FIIHA.5***@TK2MSFTNGP04.phx.gbl...Show quote > Hi, > > How can I knwo the BuildDate from an application distributed by ClickOnce? > > When I use "System.IO.File.GetLastWriteTime(objAssembly.Location)" or > "System.IO.File.GetCreationTime(objAssembly.Location)" it returns me the > date and time that the user downloaded and isntaled the application, butn > ot the date it was published... > > > Thansk a lot in advance, > > Pieter > > PS: It should work also for .NET 1.1 applications... > > > > Thanks for the help!
Unfortunately I can't use the deployment version, because the applications aren't alwaus deployed :-) I need this for a module that is used in different applications, and need to knwo the build date of it's parent-assembly. But this parent assembly can be 1.1, 2.0, deployed by clickOnce, deployed 'normally', ... I'll give the third solution a try... Show quote "Patrice" <http://www.chez.com/scribe/> wrote in message news:eMeXbRGIIHA.4296@TK2MSFTNGP04.phx.gbl... > Someone else could perhaps have a better solution but : > - my personal preference is to use the deployment version > - you also have the automatic versionaing that is based on the current > date/time. So either use this or convert it back to the date. > > Finally googling gives me : > http://www.codinghorror.com/blog/archives/000264.html (in partriuclar > reading the build date from the PE file). > > > "Pieter" <pieterNOSPAMcoucke@hotmail.com> a écrit dans le message de news: > %23nzfv2FIIHA.5***@TK2MSFTNGP04.phx.gbl... >> Hi, >> >> How can I knwo the BuildDate from an application distributed by >> ClickOnce? >> >> When I use "System.IO.File.GetLastWriteTime(objAssembly.Location)" or >> "System.IO.File.GetCreationTime(objAssembly.Location)" it returns me the >> date and time that the user downloaded and isntaled the application, butn >> ot the date it was published... >> >> >> Thansk a lot in advance, >> >> Pieter >> >> PS: It should work also for .NET 1.1 applications... >> >> >> >> > > |
|||||||||||||||||||||||