Skip to content

Commit 03ee190

Browse files
authored
Fix bug 542435 (#615)
* Fix bug 542435 * Update code style
1 parent ecc3837 commit 03ee190

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

mdoc/Mono.Documentation/frameworksbootstrapper.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public override void Run (IEnumerable<string> args)
4848
string dllPath = Path.Combine(sourcePath, fileNameWithoutExtension + ".dll");
4949
if (File.Exists(dllPath))
5050
{
51-
var version = FileVersionInfo.GetVersionInfo(dllPath).FileVersion;
52-
if (!string.IsNullOrEmpty(version))
51+
var fileVersionInfo = FileVersionInfo.GetVersionInfo(dllPath);
52+
53+
if (fileVersionInfo != null)
5354
{
55+
var version = $"{fileVersionInfo.FileMajorPart}.{fileVersionInfo.FileMinorPart}.{fileVersionInfo.FileBuildPart}.{fileVersionInfo.FilePrivatePart}";
5456
assemblyVersionMapping.Add(Path.GetFileName(xmlPath), new Version(version));
5557
}
5658
}

0 commit comments

Comments
 (0)