Skip to content

Commit 0c3f3c5

Browse files
committed
Always try to write attribute to project file if property descriptor is not available.
1 parent a6a7b50 commit 0c3f3c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/toolkit/Community.VisualStudio.Toolkit.Shared/Solution/PhysicalFile.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ public async Task<bool> TrySetAttributeAsync(string name, object value)
146146
return true;
147147
}
148148
}
149-
// Then write straight to project file
150-
else if (hierarchy is IVsBuildPropertyStorage storage)
149+
150+
// If the property descriptor was not available, then write straight to the project file.
151+
if (hierarchy is IVsBuildPropertyStorage storage)
151152
{
152153
ErrorHandler.ThrowOnFailure(storage.SetItemAttribute(itemId, name, value?.ToString()));
153154
return true;

0 commit comments

Comments
 (0)