Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
542 views
in Technique[技术] by (71.8m points)

.net - how to use sn.exe -Vr

From the MSDN help, it says the -Vr option is:

Registers assembly for verification skipping.

My question is when the -Vr is used, will it only change the assembly file itself or it will change the system registry as well. This matters whether I should issue this command in the development machine or in the final deployed machine.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

sn -Vr creates an entry in the registry on the local machine. It does not modify the assembly. You must run sn -Vr locally on every machine on which you wish to skip verification of the target assembly's strong name.

Since you mention that your concern is for a test machine, you may want to keep in mind that at least some of your test runs really ought to be run against the "as shipped" state of the application, which would include the final signature for assemblies. While I understand that key management concerns might preclude applying the final signature to, say, automated builds, you're eventually going to need to test using fully signed assemblies and no verification skipping if you want to emulate the eventual execution environment.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...