Some pre-requisites for for Razor build server
This commit is contained in:
parent
ecb323b5dc
commit
d238c0dcfc
|
|
@ -29,9 +29,10 @@
|
|||
|
||||
<TaskFolder Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netstandard2.0</TaskFolder>
|
||||
<TaskFolder Condition=" '$(MSBuildRuntimeType)' != 'Core' ">net46</TaskFolder>
|
||||
<TaskAssembly>$(_RazorMSBuildRoot)\tasks\$(TaskFolder)\Microsoft.AspNetCore.Razor.Tasks.dll</TaskAssembly>
|
||||
|
||||
<_RazorTaskAssembly Condition="'$(_RazorTaskAssembly)'==''">$(_RazorMSBuildRoot)\tasks\$(TaskFolder)\Microsoft.AspNetCore.Razor.Tasks.dll</_RazorTaskAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask TaskName="Microsoft.AspNetCore.Razor.Tasks.RazorGenerate" AssemblyFile="$(TaskAssembly)" />
|
||||
<UsingTask TaskName="Microsoft.AspNetCore.Razor.Tasks.RazorTagHelper" AssemblyFile="$(TaskAssembly)" />
|
||||
<UsingTask TaskName="Microsoft.AspNetCore.Razor.Tasks.RazorGenerate" AssemblyFile="$(_RazorTaskAssembly)" />
|
||||
<UsingTask TaskName="Microsoft.AspNetCore.Razor.Tasks.RazorTagHelper" AssemblyFile="$(_RazorTaskAssembly)" />
|
||||
</Project>
|
||||
|
|
@ -114,6 +114,7 @@
|
|||
Debug="$(_RazorDebugTagHelperTask)"
|
||||
DebugTool="$(_RazorDebugTagHelperTool)"
|
||||
ToolAssembly="$(_RazorTagHelperToolAssembly)"
|
||||
ServerAssembly="$(_RazorBuildServerAssembly)"
|
||||
Assemblies="@(RazorReferencePath)"
|
||||
TagHelperManifest="$(_RazorTagHelperOutputCache)">
|
||||
<Output
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ namespace Microsoft.AspNetCore.Razor.Tasks
|
|||
}
|
||||
}
|
||||
|
||||
if (TryExecuteOnServer(out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
return base.Execute();
|
||||
}
|
||||
|
||||
|
|
@ -76,5 +81,11 @@ namespace Microsoft.AspNetCore.Razor.Tasks
|
|||
base.LogToolCommand(message);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool TryExecuteOnServer(out bool result)
|
||||
{
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ namespace Microsoft.AspNetCore.Razor.Tasks
|
|||
[Output]
|
||||
[Required]
|
||||
public string TagHelperManifest { get; set; }
|
||||
|
||||
|
||||
public string ServerAssembly { get; set; }
|
||||
|
||||
protected override bool SkipTaskExecution()
|
||||
{
|
||||
if (Assemblies.Length == 0)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using System.Reflection;
|
|||
using System.Threading;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal class Application : CommandLineApplication
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.CodeAnalysis.CommandLine;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal abstract class Client : IDisposable
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal abstract class CommandBase : CommandLineApplication
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
|||
using System.Threading;
|
||||
using Microsoft.CodeAnalysis.CommandLine;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal abstract class CompilerHost
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.IO;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal abstract class Connection : IDisposable
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.CodeAnalysis.CommandLine;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
// Heavily influenced by:
|
||||
// https://github.com/dotnet/roslyn/blob/14aed138a01c448143b9acf0fe77a662e3dfe2f4/src/Compilers/Server/VBCSCompiler/NamedPipeClientConnection.cs#L17
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal struct ConnectionResult
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.Diagnostics;
|
|||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal static class DebugMode
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ using Microsoft.Extensions.CommandLineUtils;
|
|||
using Microsoft.VisualStudio.LanguageServices.Razor;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal class DiscoverCommand : CommandBase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal abstract class EventBus
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal static class Memory
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal static class MutexName
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
|
|||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal static class PipeName
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.CodeAnalysis.CommandLine;
|
||||
using Microsoft.CodeAnalysis.CompilerServer;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
// Heavily influenced by:
|
||||
// https://github.com/dotnet/roslyn/blob/14aed138a01c448143b9acf0fe77a662e3dfe2f4/src/Compilers/Server/ServerShared/ServerDispatcher.cs#L15
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal class ServerCommand : CommandBase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.CodeAnalysis.CommandLine;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.TagHelperTool
|
||||
namespace Microsoft.AspNetCore.Razor.Tools
|
||||
{
|
||||
internal class ShutdownCommand : CommandBase
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue