开发者

C# Reference any version?

Is it possible to not reference a specific but instead reference any version with C#? Or am I stuck setting up a PostBuild script that strips the sp开发者_如何学运维ecific version?

The reference is to another project in the same solution.


Assuming you are talking about assembly versions, In Visual Studio you can right click an assembly reference, click "Properties", and change "Specific Version" to "false".


Can assembly bindingRedirect help you somehow?

http://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.80).aspx


If you mean a version of an assembly, then yes.

There are 2 ways to do this:

  1. Stand on reference, look in property window (F4 to jump there), find "Specific Version" and change it to false.

  2. Open up the .csproj file of the assembly that references the other assemly with a text or xml editor, search file for the name of the referenced assembly and remove the version number from the file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜