Update .NET SDK 9.0 #1353
Annotations
10 errors
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L141
The code doesn't compile. Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(10,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(13,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(16,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(12,6): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(12,6): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(18,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(10,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(7,27): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(7,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(5,27): error CS0518: Predefined type 'System.Int32' is not defined or imported
Test0.cs(5,1): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(5,9): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(5,9): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(3,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
void A([TaxonomyAttribute]int param)
{
logger.LogInformation("{Prop}", param);
}
class Dummy
{
[TaxonomyAttribute()]
public string Prop;
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L112
The code doesn't compile. Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(6,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(9,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(12,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(8,6): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(8,6): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(14,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(6,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,23): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(4,1): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(3,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
logger.LogInformation("{Prop}", new Dummy().Prop);
class Dummy
{
[TaxonomyAttribute()]
public string Prop;
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L62
The code doesn't compile. Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(6,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(9,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(9,31): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(12,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(8,6): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(8,6): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(14,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(6,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,23): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(4,1): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(3,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
logger.LogInformation("{Prop}", new Dummy().Prop);
class Dummy
{
[TaxonomyAttribute()]
public string Prop { get; set; }
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L37
The code doesn't compile. Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(6,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(8,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(8,31): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(11,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(13,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(13,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(13,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(13,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(13,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(6,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,23): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(4,1): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(3,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
logger.LogInformation("{Prop}", new Dummy().Prop);
class Dummy
{
public string Prop { get; set; }
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L196
The code doesn't compile. Test0.cs(4,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(7,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(10,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(13,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(15,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(9,6): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(9,6): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(15,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(15,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(15,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(15,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(7,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(4,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(5,19): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(5,33): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(5,33): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(5,1): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(4,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
logger.BeginScope("{Prop}", new Dummy().Prop);
class Dummy
{
[TaxonomyAttribute()]
public string Prop;
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L87
The code doesn't compile. Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(6,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(9,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(9,33): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(12,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(8,6): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(8,6): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(14,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(14,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(6,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,23): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(4,37): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(4,50): error CS0518: Predefined type 'System.Int32' is not defined or imported
Test0.cs(4,1): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(3,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
logger.LogInformation("{Prop}", new Dummy().Prop[0]);
class Dummy
{
[TaxonomyAttribute()]
public string[] Prop { get; set; }
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/DoNotLogClassifiedDataAnalyzerTests.cs#L170
The code doesn't compile. Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(16,27): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(10,2): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(10,2): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(11,7): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(13,12): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(18,39): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,39): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(18,39): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(18,34): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(11,7): error CS1729: 'object' does not contain a constructor that takes 0 arguments
Test0.cs(3,1): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(7,27): error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(7,5): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(5,27): error CS0518: Predefined type 'System.Int32' is not defined or imported
Test0.cs(5,1): error CS0518: Predefined type 'System.Void' is not defined or imported
Test0.cs(5,9): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(5,9): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Test0.cs(3,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
using Microsoft.Extensions.Logging;
ILogger logger = null;
void A([TaxonomyAttribute]int param)
{
logger.LogInformation("{Prop}", param);
}
[TaxonomyAttribute()]
class Dummy
{
public string Prop;
}
class TaxonomyAttribute : Microsoft.Extensions.Compliance.Classification.DataClassificationAttribute
{
public TaxonomyAttribute() : base(Microsoft.Extensions.Compliance.Classification.DataClassification.Unknown) { }
}
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/OptimizeStringBuilderUsageAnalyzerTests.cs#L724
The code doesn't compile. Test0.cs(1,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(1,5): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(1,17): error CS1069: The type name 'StringBuilder' could not be found in the namespace 'System.Text'. This type has been forwarded to assembly 'System.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.
Test0.cs(1,52): error CS0518: Predefined type 'System.UInt64' is not defined or imported
Test0.cs(1,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
new System.Text.StringBuilder().AppendLine(default(ulong).ToString());
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/OptimizeStringBuilderUsageAnalyzerTests.cs#L724
The code doesn't compile. Test0.cs(1,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(1,5): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(1,17): error CS1069: The type name 'StringBuilder' could not be found in the namespace 'System.Text'. This type has been forwarded to assembly 'System.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.
Test0.cs(1,52): error CS0518: Predefined type 'System.SByte' is not defined or imported
Test0.cs(1,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
new System.Text.StringBuilder().AppendLine(default(sbyte).ToString());
|
Run tests:
_/tests/Meziantou.Analyzer.Test/Rules/OptimizeStringBuilderUsageAnalyzerTests.cs#L724
The code doesn't compile. Test0.cs(1,1): error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.String' is not defined or imported
Test0.cs(1,5): error CS0518: Predefined type 'System.Object' is not defined or imported
Test0.cs(1,17): error CS1069: The type name 'StringBuilder' could not be found in the namespace 'System.Text'. This type has been forwarded to assembly 'System.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.
Test0.cs(1,52): error CS0518: Predefined type 'System.Double' is not defined or imported
Test0.cs(1,1): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'
new System.Text.StringBuilder().AppendLine(default(double).ToString());
|
Loading