Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/vs17.10] Fix issue with assemblies locking #9974

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<VersionPrefix>17.10.0</VersionPrefix><DotNetFinalVersionKind>release</DotNetFinalVersionKind>
<VersionPrefix>17.10.1</VersionPrefix><DotNetFinalVersionKind>release</DotNetFinalVersionKind>
<PackageValidationBaselineVersion>17.8.3</PackageValidationBaselineVersion>
<AssemblyVersion>15.1.0.0</AssemblyVersion>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
Expand Down
12 changes: 7 additions & 5 deletions src/Tasks/GetAssembliesMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
}
Expand Down