Hello Xamarin Guys and Girls.
I'm facing one strange problem, at least for me.
When I build my project in release, FileVersionInfo.GetVersionInfo throws FileNotFoundException. I need file version info to get the product version. Bellow is part of code.
...
Assembly asm = Assembly.GetExecutingAssembly();
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);
string productVersion = fvi.ProductVersion
....
Anyhow, I found workaround by using different approach
...
Assembly asm = Assembly.GetExecutingAssembly();
AssemblyName asmName = new AssemblyName(asm.FullName);
string productVersion = string.Format("{0}.{1}.{2}.{3}", asmName.Version.Major, asmName.Version.Minor, asmName.Version.Build, asmName.Version.Revision)
...
BUT, I would like to know what is going on here. Why do I get FileNotFoundException for release?
Regards,
Novak