Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ dotnet_diagnostic.SA1131.severity = suggestion
dotnet_diagnostic.SA1132.severity = warning

# Do not combine attributes
dotnet_diagnostic.SA1133.severity = suggestion
dotnet_diagnostic.SA1133.severity = warning

# Each attribute should be placed on its own line of code
dotnet_diagnostic.SA1134.severity = suggestion
Expand Down
4 changes: 3 additions & 1 deletion src/Package/Microsoft.Build.UnGAC/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
namespace Microsoft.Build.UnGAC
{
// See: https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/fusion/iassemblycache-interface
[ComImport, Guid("E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
[Guid("E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface IAssemblyCache
{
[PreserveSig]
Expand Down
10 changes: 8 additions & 2 deletions src/Shared/StrongNameHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzK
/// version of the interface.
/// </summary>
[System.Security.SecurityCritical]
[ComImport, ComConversionLoss, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("9FD93CCF-3280-4391-B3A9-96E1CDE77C8D")]
[ComImport]
[ComConversionLoss]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("9FD93CCF-3280-4391-B3A9-96E1CDE77C8D")]
internal interface IClrStrongNameUsingIntPtr
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
Expand Down Expand Up @@ -525,7 +528,10 @@ int StrongNameTokenFromPublicKey(
/// all APIs return HResults rather than throw exceptions.
/// </summary>
[System.Security.SecurityCritical]
[ComImport, ComConversionLoss, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("9FD93CCF-3280-4391-B3A9-96E1CDE77C8D")]
[ComImport]
[ComConversionLoss]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("9FD93CCF-3280-4391-B3A9-96E1CDE77C8D")]
internal interface IClrStrongName
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/BootstrapperUtil/BootstrapperBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
/// <summary>
/// This class is the top-level object for the bootstrapper system.
/// </summary>
[ComVisible(true), Guid("1D9FE38A-0226-4b95-9C6B-6DFFA2236270"), ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Guid("1D9FE38A-0226-4b95-9C6B-6DFFA2236270")]
[ClassInterface(ClassInterfaceType.None)]
public class BootstrapperBuilder : IBootstrapperBuilder
{
private static readonly bool s_logging = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSPLOG"));
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/BootstrapperUtil/BuildResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
/// <summary>
/// Represents the results of the Build operation of the BootstrapperBuilder.
/// </summary>
[ComVisible(true), Guid("FAD7BA7C-CA00-41e0-A5EF-2DA9A74E58E6"), ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Guid("FAD7BA7C-CA00-41e0-A5EF-2DA9A74E58E6")]
[ClassInterface(ClassInterfaceType.None)]
public class BuildResults : IBuildResults
{
private readonly List<string> _componentFiles = new List<string>();
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/BootstrapperUtil/BuildSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
/// <summary>
/// This class defines the settings for the bootstrapper build operation.
/// </summary>
[ComVisible(true), Guid("5D13802C-C830-4b41-8E7A-F69D9DD6A095"), ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Guid("5D13802C-C830-4b41-8E7A-F69D9DD6A095")]
[ClassInterface(ClassInterfaceType.None)]
public class BuildSettings : IBuildSettings
{
public BuildSettings()
Expand Down
25 changes: 16 additions & 9 deletions src/Tasks/BootstrapperUtil/Interfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
/// This interface exposes functionality necessary to build a bootstrapper.
/// </summary>
[ComVisible(true)]
[Guid("1D202366-5EEA-4379-9255-6F8CDB8587C9"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("1D202366-5EEA-4379-9255-6F8CDB8587C9")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IBootstrapperBuilder
{
/// <summary>
Expand Down Expand Up @@ -40,7 +41,8 @@ public interface IBootstrapperBuilder
/// This interface defines the settings for the bootstrapper build operation.
/// </summary>
[ComVisible(true)]
[Guid("87EEBC69-0948-4ce6-A2DE-819162B87CC6"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("87EEBC69-0948-4ce6-A2DE-819162B87CC6")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IBuildSettings
{
/// <summary>
Expand Down Expand Up @@ -126,7 +128,8 @@ public interface IBuildSettings
/// This interface represents a product in the found by the BootstrapperBuilder in the Path property.
/// </summary>
[ComVisible(true)]
[Guid("9E81BE3D-530F-4a10-8349-5D5947BA59AD"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("9E81BE3D-530F-4a10-8349-5D5947BA59AD")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IProduct
{
/// <summary>
Expand Down Expand Up @@ -158,7 +161,8 @@ public interface IProduct
/// This interface describes a collection of Product objects. This collection is a closed set that is generated by the BootstrapperBuilder based on the Path property. The client cannot add or remove items from this collection.
/// </summary>
[ComVisible(true)]
[Guid("63F63663-8503-4875-814C-09168E595367"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("63F63663-8503-4875-814C-09168E595367")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IProductCollection
{
/// <summary>
Expand Down Expand Up @@ -188,7 +192,8 @@ public interface IProductCollection
/// This interface represents a buildable version of a Product. Used for the BootstrapperBuilder's Build method.
/// </summary>
[ComVisible(true)]
[Guid("0777432F-A60D-48b3-83DB-90326FE8C96E"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("0777432F-A60D-48b3-83DB-90326FE8C96E")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IProductBuilder
{
/// <summary>
Expand All @@ -202,7 +207,8 @@ public interface IProductBuilder
/// This class contains a collection of ProductBuilder objects. Used for the BootstrapperBuilder's Build method.
/// </summary>
[ComVisible(true)]
[Guid("0D593FC0-E3F1-4dad-A674-7EA4D327F79B"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("0D593FC0-E3F1-4dad-A674-7EA4D327F79B")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IProductBuilderCollection
{
/// <summary>
Expand All @@ -217,8 +223,8 @@ public interface IProductBuilderCollection
/// Represents the results of the build operation of the BootstrapperBuilder.
/// </summary>
[ComVisible(true)]
[Guid("586B842C-D9C7-43b8-84E4-9CFC3AF9F13B"),
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)]
[Guid("586B842C-D9C7-43b8-84E4-9CFC3AF9F13B")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)]
public interface IBuildResults
{
/// <summary>
Expand Down Expand Up @@ -252,7 +258,8 @@ public interface IBuildResults
/// Represents messages that occur during the BootstrapperBuilder's Build operation.
/// </summary>
[ComVisible(true)]
[Guid("E3C981EA-99E6-4f48-8955-1AAFDFB5ACE4"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("E3C981EA-99E6-4f48-8955-1AAFDFB5ACE4")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IBuildMessage
{
/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/BootstrapperUtil/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ internal enum CopyAllFilesType
/// <summary>
/// This class represents a product in the found by the BootstrapperBuilder in the Path property.
/// </summary>
[ComVisible(true), Guid("532BF563-A85D-4088-8048-41F51AC5239F"), ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Guid("532BF563-A85D-4088-8048-41F51AC5239F")]
[ClassInterface(ClassInterfaceType.None)]
public class Product : IProduct
{
private readonly Dictionary<string, Package> _cultures = new Dictionary<string, Package>(StringComparer.OrdinalIgnoreCase);
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/BootstrapperUtil/ProductBuilderCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
/// <summary>
/// This class contains a collection of ProductBuilder objects. Used for the BootstrapperBuilder's Build method.
/// </summary>
[ComVisible(true), Guid("D25C0741-99CA-49f7-9460-95E5F25EEF43"), ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Guid("D25C0741-99CA-49f7-9460-95E5F25EEF43")]
[ClassInterface(ClassInterfaceType.None)]
public class ProductBuilderCollection : IProductBuilderCollection, IEnumerable
{
private readonly List<ProductBuilder> _list = new List<ProductBuilder>();
Expand Down
4 changes: 3 additions & 1 deletion src/Tasks/BootstrapperUtil/ProductCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
/// <summary>
/// This class contains a collection of Product objects. This collection is a closed set that is generated by the BootstrapperBuilder based on the Path property. The client cannot add or remove items from this collection.
/// </summary>
[ComVisible(true), Guid("EFFA164B-3E87-4195-88DB-8AC004DDFE2A"), ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[Guid("EFFA164B-3E87-4195-88DB-8AC004DDFE2A")]
[ClassInterface(ClassInterfaceType.None)]
public class ProductCollection : IProductCollection, IEnumerable
{
private readonly List<Product> _list = new List<Product>();
Expand Down
12 changes: 9 additions & 3 deletions src/Tasks/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ internal struct ASSEMBLY_INFO
public uint cchBuf;
}

[ComImport, Guid("E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
[Guid("E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface IAssemblyCache
{
/* Unused.
Expand Down Expand Up @@ -382,7 +384,9 @@ internal enum AssemblyCacheFlags
DOWNLOAD = 4
}

[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("CD193BC0-B4BC-11d2-9833-00C04FC31D2E")]
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("CD193BC0-B4BC-11d2-9833-00C04FC31D2E")]
internal interface IAssemblyName
{
[PreserveSig]
Expand Down Expand Up @@ -434,7 +438,9 @@ int IsEqual(
int Clone(out IAssemblyName pAsmName);
}// IAssemblyName

[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("21b8916c-f28e-11d2-a473-00c04f8ef448")]
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("21b8916c-f28e-11d2-a473-00c04f8ef448")]
internal interface IAssemblyEnum
{
[PreserveSig]
Expand Down