大家好,我使用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部署的程序中
发布评论