diff --git a/eng/Versions.props b/eng/Versions.props index 09c6a48959d..17cd800a163 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 17.10.0release + 17.10.1release 17.8.3 15.1.0.0 preview diff --git a/src/Tasks/GetAssembliesMetadata.cs b/src/Tasks/GetAssembliesMetadata.cs index d5f67c62f36..520b979be03 100644 --- a/src/Tasks/GetAssembliesMetadata.cs +++ b/src/Tasks/GetAssembliesMetadata.cs @@ -50,12 +50,14 @@ public override bool Execute() // During DTB the referenced project may not has been built yet, so we need to check if the assembly already exists. if (File.Exists(assemblyPath)) { - AssemblyInformation assemblyInformation = new(assemblyPath); - AssemblyAttributes attributes = assemblyInformation.GetAssemblyMetadata(); - - if (attributes != null) + using (AssemblyInformation assemblyInformation = new(assemblyPath)) { - assembliesMetadata.Add(CreateItemWithMetadata(attributes)); + AssemblyAttributes attributes = assemblyInformation.GetAssemblyMetadata(); + + if (attributes != null) + { + assembliesMetadata.Add(CreateItemWithMetadata(attributes)); + } } } }