diff --git a/src/toolkit/Community.VisualStudio.Toolkit.Shared/Solution/PhysicalFile.cs b/src/toolkit/Community.VisualStudio.Toolkit.Shared/Solution/PhysicalFile.cs index 110233f..a73fcc2 100644 --- a/src/toolkit/Community.VisualStudio.Toolkit.Shared/Solution/PhysicalFile.cs +++ b/src/toolkit/Community.VisualStudio.Toolkit.Shared/Solution/PhysicalFile.cs @@ -146,8 +146,9 @@ public async Task TrySetAttributeAsync(string name, object value) return true; } } - // Then write straight to project file - else if (hierarchy is IVsBuildPropertyStorage storage) + + // If the property descriptor was not available, then write straight to the project file. + if (hierarchy is IVsBuildPropertyStorage storage) { ErrorHandler.ThrowOnFailure(storage.SetItemAttribute(itemId, name, value?.ToString())); return true;