Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
134 changes: 132 additions & 2 deletions src/Tasks/Al.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#if NETFRAMEWORK
using System;

using Microsoft.Build.Framework;
using Microsoft.Build.Shared.FileSystem;
using Microsoft.Build.Utilities;
#endif

using Microsoft.Build.Framework;

#nullable disable

namespace Microsoft.Build.Tasks
{
#if NETFRAMEWORK

/// <summary>
/// This class defines the "AL" XMake task, which enables using al.exe to link
/// modules and resource files into assemblies.
/// </summary>
public class AL : ToolTaskExtension
public class AL : ToolTaskExtension, IALTaskContract
{
#region Properties
/*
Expand Down Expand Up @@ -387,6 +392,131 @@ public override bool Execute()
return base.Execute();
}

#endregion
}

#else

/// <summary>
/// Stub AL task for .NET Core.
/// </summary>
public sealed class AL : TaskRequiresFramework, IALTaskContract
{
public AL()
: base(nameof(AL))
{
}

#region Properties

public string AlgorithmId { get; set; }

public string BaseAddress { get; set; }

public string CompanyName { get; set; }

public string Configuration { get; set; }

public string Copyright { get; set; }

public string Culture { get; set; }

public bool DelaySign { get; set; }

public string Description { get; set; }

public string EvidenceFile { get; set; }

public string FileVersion { get; set; }

public string Flags { get; set; }

public bool GenerateFullPaths { get; set; }

public string KeyFile { get; set; }

public string KeyContainer { get; set; }

public string MainEntryPoint { get; set; }

[Output]
[Required]
public ITaskItem OutputAssembly { get; set; }

public string Platform { get; set; }

public bool Prefer32Bit { get; set; }

public string ProductName { get; set; }

public string ProductVersion { get; set; }

public string[] ResponseFiles { get; set; }

public string TargetType { get; set; }

public string TemplateFile { get; set; }

public string Title { get; set; }

public string Trademark { get; set; }

public string Version { get; set; }

public string Win32Icon { get; set; }

public string Win32Resource { get; set; }

public ITaskItem[] SourceModules { get; set; }

public ITaskItem[] EmbedResources { get; set; }

public ITaskItem[] LinkResources { get; set; }

public string SdkToolsPath { get; set; }

#endregion
}

#endif

internal interface IALTaskContract
{
#region Properties

string AlgorithmId { get; set; }
string BaseAddress { get; set; }
string CompanyName { get; set; }
string Configuration { get; set; }
string Copyright { get; set; }
string Culture { get; set; }
bool DelaySign { get; set; }
string Description { get; set; }
string EvidenceFile { get; set; }
string FileVersion { get; set; }
string Flags { get; set; }
bool GenerateFullPaths { get; set; }
string KeyFile { get; set; }
string KeyContainer { get; set; }
string MainEntryPoint { get; set; }
ITaskItem OutputAssembly { get; set; }
string Platform { get; set; }
bool Prefer32Bit { get; set; }
string ProductName { get; set; }
string ProductVersion { get; set; }
string[] ResponseFiles { get; set; }
string TargetType { get; set; }
string TemplateFile { get; set; }
string Title { get; set; }
string Trademark { get; set; }
string Version { get; set; }
string Win32Icon { get; set; }
string Win32Resource { get; set; }
ITaskItem[] SourceModules { get; set; }
ITaskItem[] EmbedResources { get; set; }
ITaskItem[] LinkResources { get; set; }
string SdkToolsPath { get; set; }

#endregion
}
}
72 changes: 71 additions & 1 deletion src/Tasks/AspNetCompiler.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#if NETFRAMEWORK
using Microsoft.Build.Utilities;
#endif

#nullable disable

namespace Microsoft.Build.Tasks
{
#if NETFRAMEWORK

/// <summary>
/// The AspNetCompiler task, which is a wrapper around aspnet_compiler.exe
/// </summary>
public class AspNetCompiler : ToolTaskExtension
public class AspNetCompiler : ToolTaskExtension, IAspNetCompilerTaskContract
{
/*
C:\WINDOWS\Microsoft.NET\Framework\v2.0.x86dbg>aspnet_compiler /?
Expand Down Expand Up @@ -338,4 +342,70 @@ protected override bool ValidateParameters()
return true;
}
}

#else

public sealed class AspNetCompiler : TaskRequiresFramework, IAspNetCompilerTaskContract
{
public AspNetCompiler()
: base(nameof(AspNetCompiler))
{
}

#region Properties

public bool AllowPartiallyTrustedCallers { get; set; }

public bool DelaySign { get; set; }

public bool FixedNames { get; set; }

public string KeyContainer { get; set; }

public string KeyFile { get; set; }

public string MetabasePath { get; set; }

public string PhysicalPath { get; set; }

public string TargetPath { get; set; }

public string VirtualPath { get; set; }

public bool Updateable { get; set; }

public bool Force { get; set; }

public bool Debug { get; set; }

public bool Clean { get; set; }

public string TargetFrameworkMoniker { get; set; }

#endregion
}

#endif

internal interface IAspNetCompilerTaskContract
{
#region Properties

bool AllowPartiallyTrustedCallers { get; set; }
bool DelaySign { get; set; }
bool FixedNames { get; set; }
string KeyContainer { get; set; }
string KeyFile { get; set; }
string MetabasePath { get; set; }
string PhysicalPath { get; set; }
string TargetPath { get; set; }
string VirtualPath { get; set; }
bool Updateable { get; set; }
bool Force { get; set; }
bool Debug { get; set; }
bool Clean { get; set; }
string TargetFrameworkMoniker { get; set; }

#endregion
}
}
86 changes: 84 additions & 2 deletions src/Tasks/GenerateBootstrapper.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#if NETFRAMEWORK
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Tasks.Deployment.Bootstrapper;
#endif

using Microsoft.Build.Framework;

#nullable disable

namespace Microsoft.Build.Tasks
{
#if NETFRAMEWORK

/// <summary>
/// Generates a bootstrapper for ClickOnce deployment projects.
/// </summary>
public sealed class GenerateBootstrapper : TaskExtension
public sealed class GenerateBootstrapper : TaskExtension, IGenerateBootstrapperTaskContract
{
public string ApplicationName { get; set; }

Expand Down Expand Up @@ -174,4 +179,81 @@ private ComponentsLocation ConvertStringToComponentsLocation(string parameterVal
}
}
}

#else

public sealed class GenerateBootstrapper : TaskRequiresFramework, IGenerateBootstrapperTaskContract
{
public GenerateBootstrapper()
: base(nameof(GenerateBootstrapper))
{
}

#region Properties

public string ApplicationName { get; set; }

public string ApplicationFile { get; set; }

public bool ApplicationRequiresElevation { get; set; }

public string ApplicationUrl { get; set; }

public ITaskItem[] BootstrapperItems { get; set; }

public string ComponentsLocation { get; set; }

public string ComponentsUrl { get; set; }

public bool CopyComponents { get; set; }

public string Culture { get; set; }

public string FallbackCulture { get; set; }

public string OutputPath { get; set; }

public string Path { get; set; }

public string SupportUrl { get; set; }

public string VisualStudioVersion { get; set; }

public bool Validate { get; set; }

[Output]
public string BootstrapperKeyFile { get; set; }

[Output]
public string[] BootstrapperComponentFiles { get; set; }

#endregion
}

#endif

internal interface IGenerateBootstrapperTaskContract
{
#region Properties

string ApplicationName { get; set; }
string ApplicationFile { get; set; }
bool ApplicationRequiresElevation { get; set; }
string ApplicationUrl { get; set; }
ITaskItem[] BootstrapperItems { get; set; }
string ComponentsLocation { get; set; }
string ComponentsUrl { get; set; }
bool CopyComponents { get; set; }
string Culture { get; set; }
string FallbackCulture { get; set; }
string OutputPath { get; set; }
string Path { get; set; }
string SupportUrl { get; set; }
string VisualStudioVersion { get; set; }
bool Validate { get; set; }
string BootstrapperKeyFile { get; set; }
string[] BootstrapperComponentFiles { get; set; }

#endregion
}
}
Loading