Skip to content

Commit

Permalink
Enable SignFile on .NET Core (#6509)
Browse files Browse the repository at this point in the history
Fixes #6098.

The `SignFile` task is referenced by the SDK for both .NET Framework and Core/5+, but not actually included in the non-framework assemblies.

A simple test, applying `SignFile` to one of the DLLs in artifacts using a self-signed certificate, succeeded.
  • Loading branch information
Zastai authored Jun 2, 2021
1 parent 2be2ece commit 5e37cc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,18 @@ public SGen() { }
public override bool Execute() { throw null; }
protected override string GenerateFullPathToTool() { throw null; }
}
public sealed partial class SignFile : Microsoft.Build.Utilities.Task
{
public SignFile() { }
[Microsoft.Build.Framework.RequiredAttribute]
public string CertificateThumbprint { get { throw null; } set { } }
[Microsoft.Build.Framework.RequiredAttribute]
public Microsoft.Build.Framework.ITaskItem SigningTarget { get { throw null; } set { } }
public string TargetFrameworkIdentifier { get { throw null; } set { } }
public string TargetFrameworkVersion { get { throw null; } set { } }
public string TimestampUrl { get { throw null; } set { } }
public override bool Execute() { throw null; }
}
public abstract partial class TaskExtension : Microsoft.Build.Utilities.Task
{
internal TaskExtension() { }
Expand Down
6 changes: 3 additions & 3 deletions src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@
<Compile Include="SGen.cs" Condition="'$(MonoBuild)' != 'true'">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="SignFile.cs" Condition="'$(MonoBuild)' != 'true'">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="System.Design.cs" />
<Compile Include="system.design\stronglytypedresourcebuilder.cs" />
<Compile Include="TaskExtension.cs">
Expand Down Expand Up @@ -646,9 +649,6 @@
<Compile Include="RequiresFramework35SP1Assembly.cs" Condition="'$(MonoBuild)' != 'true'">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="SignFile.cs" Condition="'$(MonoBuild)' != 'true'">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="StrongNameException.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
Expand Down

0 comments on commit 5e37cc9

Please sign in to comment.