开发者

How to get asp.net website product name and version?

开发者 https://www.devze.com 2023-01-24 23:23 出处:网络
Hopefully this is an easy one - though I don\'t seem to have much luck Googling the following: Usually in an ASP.NET Web Application I would write - My.Application.Info.ProductName or My.Application.

Hopefully this is an easy one - though I don't seem to have much luck Googling the following:

Usually in an ASP.NET Web Application I would write - My.Application.Info.ProductName or My.Application.Info.Version, but I'm looking at an o开发者_开发知识库lder ASP.NET Web Site and it doesn't have the Application option.

Does anyone know the equivalents?


I asked a similar question:

How should I version an ASP.NET Web Site project?

My solution was to use the assembly version of an assembly I included with my web site.


Do you mean the name as stated in the AssemblyInfo-file? In that case you can get the name by

System.Reflection.Assembly.GetExecutingAssembly().GetName()
0

精彩评论

暂无评论...
验证码 换一张
取 消