Я хочу сохранить версию в таблице базы данных и не хочу использовать varchar(max)
для этого.Я хочу что-то исправить varchar(xxx)
Подскажите, пожалуйста, какова максимально возможная длина FileVersionInfo.FileVersion
на платформах Windows?
Собственно выяснили, как получить правильную версию:
var ver = FileVersionInfo.GetVersionInfo("D:\\oraociei11.dll").FileVersion;
Возвращает для Oracle lib:
OraOCIEI11.dll - 11.2.0.1.0 Production
oracore11.dll - 11.2.0.1.0 Production
oranls11.dll - 11.1.0.6.0 Production
orasnls11.dll - 11.1.0.6.0 Production
oraunls11.dll - 11.1.0.6.0 Production
oravsn11.dll - 11.2.0.2.0 Production
oracommon11.dll - 11.2.0.2.0 Production
orageneric11.dll - 11.2.0.2.0 Production
oraclient11.dll - 11.2.0.2.0 Production
orapls11.dll - 11.1.0.6.0 Production
orasql11.dll - 11.1.0.6.0 Production
oraxml11.dll - 11.1.0.6.0 Production
orahasgen11.dll - 11.2.0.1.0 Production
oraocrutl11.dll - 11.2.0.1.0 Production
oraocr11.dll - 11.2.0.1.0 Production
oraocrb11.dll - 11.2.0.1.0 Production
oranbeq11.dll - 11.2.0.2.0 Production
orantcp11.dll - 11.2.0.2.0 Production
orantcps11.dll - 11.2.0.2.0 Production
orannmp11.dll - 11.2.0.2.0 Production
orancds11.dll - 11.2.0.2.0 Production
oranldap11.dll - 11.2.0.2.0 Production
oraldapclnt11.dll - 10.1.4.0.1 Production
oraolapapi11.dll -
oranhost11.dll - 11.2.0.2.0 Production
orantns11.dll - 11.2.0.2.0 Production
oranoname11.dll -
oransgr11.dll - 11.2.0.2.0 Production
orancrypt11.dll - 11.2.0.2.0 Production
oransgr11.dll - 11.2.0.2.0 Production
oranl11.dll - 11.2.0.2.0 Production
oranro11.dll - 11.2.0.2.0 Production
oranbeq11.dll - 11.2.0.2.0 Production
orantcps11.dll - 11.2.0.2.0 Production
orannmp11.dll - 11.2.0.2.0 Production
orancds11.dll - 11.2.0.2.0 Production
oranldap11.dll - 11.2.0.2.0 Production
oraldapclnt11.dll - 10.1.4.0.1 Production
orannzsbb11.dll - 11.0.0.1.0 Production
oran11.dll - 11.2.0.2.0 Production
orannzmcs11.dll - 11.0.0.1.0 Production
oranjssl11.dll - 11.2.0.2.0 Production
oranjni11.dll - 11.2.0.2.0 Production
oranipc11.dll - 11.2.0.2.0 Production
Чтобы правильно получить версию файла:
var versionInfo = FileVersionInfo.GetVersionInfo("D:\\oraociei11.dll");
var properVersion = string.Format("{0}.{1}.{2}.{3}", versionInfo.FileMajorPart, versionInfo.FileMinorPart, versionInfo.FileBuildPart, versionInfo.FilePrivatePart);
Спасибо, ребята, за участие!