如何使用csc编译时指定.dll版本 [英] How to specify a .dll version when compiling it with csc
本文介绍了如何使用csc编译时指定.dll版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我一直在用cmd编译我的所有c#dll'这样的:
Hello
I''ve been compiling all of my c# dll''s like this in cmd:
csc /target:library /out:MathLibrary.DLL Add.cs Mult.cs
我想知道你是否可以在那里放置某种命令来指定dll的版本,如下所示:
I was wondering if you could put some sort of command in there to specify the version of the dll, something like this:
csc /target:library '/version:1 . 0 . 0 . 0' /out:MathLibrary.DLL Add.cs Mult.cs
这不行,但如果你能搞清楚一些替代方案会很棒!
谢谢
This doesn''t work, but if you could figure out some alternative that would be great!
Thanks
推荐答案
不,但你可以添加一个属性( AssamblyVersionAttribute [ ^ ])到将编译为元数据的代码。另请参阅: http://msdn.microsoft.com/en-us/ library / ms379563(v = vs.80).aspx [ ^ ]
No, but you can add an attribute (AssamblyVersionAttribute[^]) to the code that will be compiled to metadata. See also: http://msdn.microsoft.com/en-us/library/ms379563(v=vs.80).aspx[^]
这篇关于如何使用csc编译时指定.dll版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文