在运行时中获取Assembly.GetExecutingAssembly().lastwritetime?在Clickonce部署的程序中

编程入门 行业动态 更新时间:2024-10-19 14:47:12
本文介绍了在运行时中获取Assembly.GetExecutingAssembly().lastwritetime?在Clickonce部署的程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好,我使用Clickonce发布了一个程序,我试图获取在我的计算机上VS2010中构建/发布.exe或.application的日期,以便客户端可以在他们在计算机上运行该应用程序. 但是似乎在运行时使用ApplicationDeployment类的发布版本信息正在运行,但是Assembly.GetExecutingAssembly()中的日期信息仅在调试时有效,而在运行时不起作用. 关于如何获取.exe/.application日期的任何建议? 还是仅使用上次写入文件的日期的变通办法?请启发我

Hi guys,i published a program using Clickonce, and I''m trying to get a date of when the .exe or .application is built/published in VS2010 on my computer, so that a client can see that date when they run the application on their computer. But it seems during runtime the publish version info using the ApplicationDeployment class is working, but the date info from Assembly.GetExecutingAssembly() only works during debug, not in runtime. Any suggestions how to get a date for the .exe/.application? Or maybe a workaround of simply using the date of when the file was last written? please enlighten me

推荐答案

我在以下位置构建自己的时间戳:带有构建日期和时间的时间戳记程序集. [ ^ ] I build my own timestamp in: Timestamping assemblies with Build date and time.[^]

更多推荐

在运行时中获取Assembly.GetExecutingAssembly().lastwritetime?在Clickonce部署的程序中

本文发布于:2023-11-13 14:43:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584611.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   GetExecutingAssembly   Assembly   Clickonce   lastwritetime

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!