Skip to content

Commit

Permalink
Merge pull request #384 from reduckted/bugfix/physical-file-set-attri…
Browse files Browse the repository at this point in the history
…bute

Always try to write attribute to project file if property descriptor is not available
[release]
  • Loading branch information
madskristensen authored Nov 17, 2022
2 parents fa985b3 + 0c3f3c5 commit a824d61
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ public async Task<bool> 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;
Expand Down

0 comments on commit a824d61

Please sign in to comment.