This article is a mirror article of machine translation, please click here to jump to the original article.

View: 2949|Reply: 2

[Tips] .NET Core gets the unique identity of the assembly

[Copy link]
Posted on 3/17/2024 6:11:13 PM | | | |
Requirements: When the .NET program is modified, it is necessary to execute some special code, so that the program does not modify and skip the execution of special code, in order to prevent the execution of special code multiple times (high-performance operation, do not want to execute every start, only the program code needs to be executed after modification), at the beginning I want to judge by the assembly version, but if I forget to modify the assembly version, it will lead to a BUG, and it is too troublesome to modify the assembly version every time, what if I get the unique identifier of the assembly?

As long as the code is not modified, the same unique identifier is output every time the program starts, the code is as follows:



(End)





Previous:Windows 11 can't create a new notepad file (text document)
Next:Alibaba Cloud replaces the private network (virtual switch) network is unreachable
 Landlord| Posted on 10/19/2024 5:12:58 PM |
Major, Minor, Build Number, and Revision version numbers are annotated
https://www.itsvse.com/thread-10852-1-1.html
 Landlord| Posted on 10/19/2024 5:14:58 PM |
Usage scenarios: MVC project, front-end js, css cache, parameter modification
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com