Skip to content

Commit a824d61

Browse files
Merge pull request #384 from reduckted/bugfix/physical-file-set-attribute
Always try to write attribute to project file if property descriptor is not available [release]
2 parents fa985b3 + 0c3f3c5 commit a824d61

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)