FileVersionInfo.GetVersionInfo("~/bin/MyFile.dll").FileVersion
When I make this call, I get the following error:
"Cannot evaluate expression because the code of the current method is optimized"
Is there any way to get the version of a DLL in an ASP web app? Code behind is VB... but I'm guessing it doesn't matter if it's VB or C#.
It must work in RELEASE, and when the app is deployed to a production environment. I've searched the interwebs but only found a lot of DEBUG vs. RELEASE config.
I've also tried this with no help:
http://torulflundgren.blogspot.com.au/2010/03/cannot-obtain-value-of-local-or.html
Thanks in advance!