开发者

How to make sgen.exe keep the version of the assembly?

开发者 https://www.devze.com 2022-12-19 07:53 出处:网络
I want to create a serialization assembly for my assembly.sgen does it fine, but I can\'t figur开发者_高级运维e out how to get it to assign the serialization assembly the same version as the source as

I want to create a serialization assembly for my assembly. sgen does it fine, but I can't figur开发者_高级运维e out how to get it to assign the serialization assembly the same version as the source assembly.

Any ideas?


sgen seem to take source assembly version by default, it is quite reasonable.

Here is how I run it, there is nothing special:

"...PathToSDK...\Microsoft Visual Studio SDK\sgen.exe" /force /assembly:"$(TargetPath)" /compiler:"\"/keyfile:$(ProjectDir)..\key.snk"\" /compiler:/delaysign-

/force -- to overwrite existing serializer assemblies

/assembly -- path to the assembly, I run it in the post-build event in the VS project settings, so I use the $(TargetPath) variable

/compiler: ... -- csc options, I use them to sign serializer assemblies with the key

0

精彩评论

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

关注公众号