Is there a way to have the .NET compiler enforce (by producing a compile error) that a .NET project requires AT LEAST version x.x.x.x of a particular DLL to compile successfully and run?
Asked
Active
Viewed 119 times
1
-
It has necessarily to be a compiler error? Checking it at the start of the application (and throwing an error or showing a warning or something like that) would be quite easy and the result would be basically the same. For example: http://stackoverflow.com/questions/1755504/programatically-get-the-version-number-of-a-dll. – varocarbas Nov 13 '15 at 22:10
-
Long answer:no. [Read this](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). – Hans Passant Nov 13 '15 at 22:49
-
You can write a pre-build command to compare versions. – Hamid Pourjam Nov 13 '15 at 22:57