You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MessagePackCodeFixProvider crashes when uses code fix it to insert keys on an inherited class if the base class hasn't yet been annotated and is in a separate file.
Repro steps
Have MessagePackAnalyzers installed.
Put this code in one file:
namespace AttackSurfaceAnalyzer.Objects
{
public abstract class CollectObject
{
public abstract string Identity { get; }
}
}
Put this code in a separate file (it doesn't crash if they are in the same file):
using MessagePack;
namespace AttackSurfaceAnalyzer.Objects
{
[MessagePackObject]
public class CertificateObject : CollectObject
{
public string StoreLocation { get; set; }
public string StoreName { get; set; }
public string CertificateHashString { get; set; }
public string Subject { get; set; }
public string Pkcs7 { get; set; }
public override string Identity
{
get
{
return $"{StoreLocation}{StoreName}{CertificateHashString}";
}
}
}
}
Right click to perform the fix-it to add the keys on any of the fields in CertificateObject and the extension will crash.
Expected behavior
Add keys appropriately.
Actual behavior
What happened instead of what you expected.
Version used: 2.1.90
Runtime: .NET Core 3.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Bug description
MessagePackCodeFixProvider crashes when uses code fix it to insert keys on an inherited class if the base class hasn't yet been annotated and is in a separate file.
Repro steps
Have MessagePackAnalyzers installed.
Put this code in one file:
Put this code in a separate file (it doesn't crash if they are in the same file):
Right click to perform the fix-it to add the keys on any of the fields in CertificateObject and the extension will crash.
Expected behavior
Add keys appropriately.
Actual behavior
What happened instead of what you expected.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: