parent
b3be0ebb91
commit
2c27272e4d
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
Name="_RazorResolveTagHelpers"
|
Name="_RazorResolveTagHelpers"
|
||||||
DependsOnTargets="CoreCompile;RazorResolveAssemblyReferences"
|
DependsOnTargets="Compile;RazorResolveAssemblyReferences"
|
||||||
Inputs="$(MSBuildAllProjects);@(RazorReferencePath)"
|
Inputs="$(MSBuildAllProjects);@(RazorReferencePath)"
|
||||||
Outputs="$(_RazorTagHelperInputCache)">
|
Outputs="$(_RazorTagHelperInputCache)">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// 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.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
|
|
@ -10,7 +13,10 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
{
|
{
|
||||||
public static void BuildPassed(MSBuildResult result)
|
public static void BuildPassed(MSBuildResult result)
|
||||||
{
|
{
|
||||||
NotNull(result);
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
};
|
||||||
|
|
||||||
if (result.ExitCode != 0)
|
if (result.ExitCode != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -18,24 +24,69 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void FileExists(MSBuildResult result, string filePath)
|
public static void FileExists(MSBuildResult result, params string[] paths)
|
||||||
{
|
{
|
||||||
NotNull(result);
|
if (result == null)
|
||||||
NotNull(filePath);
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
if (!File.Exists(Path.Combine(result.Project.DirectoryPath, filePath)))
|
var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths));
|
||||||
|
if (!File.Exists(filePath))
|
||||||
{
|
{
|
||||||
throw new FileMissingException(result, filePath);
|
throw new FileMissingException(result, filePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BuildFailedException : Xunit.Sdk.XunitException
|
public static void FileCountEquals(MSBuildResult result, int expected, string directoryPath, string searchPattern)
|
||||||
{
|
{
|
||||||
public BuildFailedException(MSBuildResult result)
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (directoryPath == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(directoryPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchPattern == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(searchPattern));
|
||||||
|
}
|
||||||
|
|
||||||
|
directoryPath = Path.Combine(result.Project.DirectoryPath, directoryPath);
|
||||||
|
|
||||||
|
var files = Directory.GetFiles(directoryPath, searchPattern, SearchOption.AllDirectories);
|
||||||
|
if (files.Length != expected)
|
||||||
|
{
|
||||||
|
throw new FileCountException(result, expected, directoryPath, searchPattern, files);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileDoesNotExist(MSBuildResult result, params string[] paths)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths));
|
||||||
|
if (File.Exists(filePath))
|
||||||
|
{
|
||||||
|
throw new FileFoundException(result, filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private abstract class MSBuildXunitException : Xunit.Sdk.XunitException
|
||||||
|
{
|
||||||
|
protected MSBuildXunitException(MSBuildResult result)
|
||||||
{
|
{
|
||||||
Result = result;
|
Result = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract string Heading { get; }
|
||||||
|
|
||||||
public MSBuildResult Result { get; }
|
public MSBuildResult Result { get; }
|
||||||
|
|
||||||
public override string Message
|
public override string Message
|
||||||
|
|
@ -43,7 +94,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var message = new StringBuilder();
|
var message = new StringBuilder();
|
||||||
message.Append("Build failed: ");
|
message.AppendLine(Heading);
|
||||||
message.Append(Result.FileName);
|
message.Append(Result.FileName);
|
||||||
message.Append(" ");
|
message.Append(" ");
|
||||||
message.Append(Result.Arguments);
|
message.Append(Result.Arguments);
|
||||||
|
|
@ -55,35 +106,84 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FileMissingException : Xunit.Sdk.XunitException
|
private class BuildFailedException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildFailedException(MSBuildResult result)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Heading => "Build failed:";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileMissingException : MSBuildXunitException
|
||||||
{
|
{
|
||||||
public FileMissingException(MSBuildResult result, string filePath)
|
public FileMissingException(MSBuildResult result, string filePath)
|
||||||
|
: base(result)
|
||||||
{
|
{
|
||||||
Result = result;
|
|
||||||
FilePath = filePath;
|
FilePath = filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FilePath { get; }
|
public string FilePath { get; }
|
||||||
|
|
||||||
public MSBuildResult Result { get; }
|
protected override string Heading => $"File: '{FilePath}' was not found.";
|
||||||
|
}
|
||||||
|
|
||||||
public override string Message
|
private class FileCountException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileCountException(MSBuildResult result, int expected, string directoryPath, string searchPattern, string[] files)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
Expected = expected;
|
||||||
|
DirectoryPath = directoryPath;
|
||||||
|
SearchPattern = searchPattern;
|
||||||
|
Files = files;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string DirectoryPath { get; }
|
||||||
|
|
||||||
|
public int Expected { get; }
|
||||||
|
|
||||||
|
public string[] Files { get; }
|
||||||
|
|
||||||
|
public string SearchPattern { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var message = new StringBuilder();
|
var heading = new StringBuilder();
|
||||||
message.Append($"File: '{FilePath}' was not found.");
|
heading.AppendLine($"Expected {Expected} files matching {SearchPattern} in {DirectoryPath}, found {Files.Length}.");
|
||||||
message.Append(Result.FileName);
|
|
||||||
message.Append(" ");
|
|
||||||
message.Append(Result.Arguments);
|
|
||||||
message.AppendLine();
|
|
||||||
message.AppendLine();
|
|
||||||
message.Append(Result.Output);
|
|
||||||
return message.ToString();
|
|
||||||
|
|
||||||
;
|
if (Files.Length > 0)
|
||||||
|
{
|
||||||
|
heading.AppendLine("Files:");
|
||||||
|
|
||||||
|
foreach (var file in Files)
|
||||||
|
{
|
||||||
|
heading.Append("\t");
|
||||||
|
heading.Append(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
heading.AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
return heading.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class FileFoundException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileFoundException(MSBuildResult result, string filePath)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"File: '{FilePath}' was found, but should not exist.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
|
{
|
||||||
|
public class BuildIntegrationTest : MSBuildIntegrationTestBase
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[InitializeTestProject("SimpleMvc")]
|
||||||
|
public async Task Build_SimpleMvc_CanBuildSuccessfully()
|
||||||
|
{
|
||||||
|
var result = await DotnetMSBuild("Build", "/p:RazorCompileOnBuild=true");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
Assert.FileExists(result, OutputPath, "SimpleMvc.dll");
|
||||||
|
Assert.FileExists(result, OutputPath, "SimpleMvc.PrecompiledViews.dll");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
// 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.
|
|
||||||
|
|
||||||
using System.IO;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Xunit;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|
||||||
{
|
|
||||||
public class CleanProjectIntegrationTest : MSBuildIntegrationTestBase
|
|
||||||
{
|
|
||||||
[Fact]
|
|
||||||
[InitializeTestProject("SimpleMvc")]
|
|
||||||
public async Task CleanProject_RunBuild()
|
|
||||||
{
|
|
||||||
var result = await DotnetMSBuild("Restore;Build", "/p:RazorCompileOnBuild=true;Configuration=Debug");
|
|
||||||
|
|
||||||
Assert.BuildPassed(result);
|
|
||||||
Assert.FileExists(result, Path.Combine("bin", "Debug", "netcoreapp2.0", "SimpleMvc.dll"));
|
|
||||||
Assert.FileExists(result, Path.Combine("bin", "Debug", "netcoreapp2.0", "SimpleMvc.PrecompiledViews.dll"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -36,7 +36,5 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
MSBuildIntegrationTestBase.Project.Dispose();
|
MSBuildIntegrationTestBase.Project.Dispose();
|
||||||
MSBuildIntegrationTestBase.Project = null;
|
MSBuildIntegrationTestBase.Project = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,55 +2,49 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.IO;
|
||||||
#if NET461
|
|
||||||
using System.Runtime.Remoting;
|
|
||||||
using System.Runtime.Remoting.Messaging;
|
|
||||||
#else
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
#endif
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
{
|
{
|
||||||
public abstract class MSBuildIntegrationTestBase
|
public abstract class MSBuildIntegrationTestBase
|
||||||
{
|
{
|
||||||
#if NET461
|
|
||||||
#elif NETCOREAPP2_0 || NETCOREAPP2_1
|
|
||||||
private static readonly AsyncLocal<ProjectDirectory> _project = new AsyncLocal<ProjectDirectory>();
|
private static readonly AsyncLocal<ProjectDirectory> _project = new AsyncLocal<ProjectDirectory>();
|
||||||
#else
|
|
||||||
#error TFM not supported
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected MSBuildIntegrationTestBase()
|
protected MSBuildIntegrationTestBase()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
protected string Configuration => "Debug";
|
||||||
|
#elif RELEASE
|
||||||
|
protected string Configuration => "Release";
|
||||||
|
#else
|
||||||
|
#error Configuration not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
|
protected string IntermediateOutputPath => Path.Combine("obj", Configuration, TargetFramework);
|
||||||
|
|
||||||
|
protected string OutputPath => Path.Combine("bin", Configuration, TargetFramework);
|
||||||
|
|
||||||
// Used by the test framework to set the project that we're working with
|
// Used by the test framework to set the project that we're working with
|
||||||
internal static ProjectDirectory Project
|
internal static ProjectDirectory Project
|
||||||
{
|
{
|
||||||
#if NET461
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var handle = (ObjectHandle)CallContext.LogicalGetData("MSBuildIntegrationTestBase_Project");
|
|
||||||
return (ProjectDirectory)handle.Unwrap();
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
CallContext.LogicalSetData("MSBuildIntegrationTestBase_Project", new ObjectHandle(value));
|
|
||||||
}
|
|
||||||
#elif NETCOREAPP2_0 || NETCOREAPP2_1
|
|
||||||
get { return _project.Value; }
|
get { return _project.Value; }
|
||||||
set { _project.Value = value; }
|
set { _project.Value = value; }
|
||||||
#else
|
|
||||||
#error TFM not supported
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Task<MSBuildResult> DotnetMSBuild(string target, string args = null, bool debug = false)
|
protected string RazorIntermediateOutputPath => Path.Combine(IntermediateOutputPath, "Razor");
|
||||||
|
|
||||||
|
protected string TargetFramework { get; set; } = "netcoreapp2.0";
|
||||||
|
|
||||||
|
internal Task<MSBuildResult> DotnetMSBuild(string target, string args = null, bool suppressRestore = false, bool suppressTimeout = false)
|
||||||
{
|
{
|
||||||
var timeout = debug ? (TimeSpan?)Timeout.InfiniteTimeSpan : null;
|
var timeout = suppressTimeout ? (TimeSpan?)Timeout.InfiniteTimeSpan : null;
|
||||||
return MSBuildProcessManager.RunProcessAsync(Project, $"/t:{target} {args}", timeout);
|
var restoreArgument = suppressRestore ? "" : "/restore";
|
||||||
|
|
||||||
|
return MSBuildProcessManager.RunProcessAsync(Project, $"{restoreArgument} /t:{target} /p:Configuration={Configuration} {args}", timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,11 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
throw new InvalidOperationException($"Could not find project at '{projectRoot}'");
|
throw new InvalidOperationException($"Could not find project at '{projectRoot}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var binariesRoot = Path.GetDirectoryName(typeof(ProjectDirectory).Assembly.Location);
|
||||||
|
|
||||||
CopyDirectory(new DirectoryInfo(projectRoot), new DirectoryInfo(destinationPath));
|
CopyDirectory(new DirectoryInfo(projectRoot), new DirectoryInfo(destinationPath));
|
||||||
|
|
||||||
CreateDirectoryProps(projectRoot, destinationPath);
|
CreateDirectoryProps(projectRoot, binariesRoot, destinationPath);
|
||||||
CreateDirectoryTargets(destinationPath);
|
CreateDirectoryTargets(destinationPath);
|
||||||
|
|
||||||
return new ProjectDirectory(destinationPath);
|
return new ProjectDirectory(destinationPath);
|
||||||
|
|
@ -69,7 +71,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDirectoryProps(string originalProjectRoot, string projectRoot)
|
void CreateDirectoryProps(string originalProjectRoot, string binariesRoot, string projectRoot)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
var configuration = "Debug";
|
var configuration = "Debug";
|
||||||
|
|
@ -82,6 +84,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OriginalProjectRoot>{originalProjectRoot}</OriginalProjectRoot>
|
<OriginalProjectRoot>{originalProjectRoot}</OriginalProjectRoot>
|
||||||
|
<BinariesRoot>{binariesRoot}</BinariesRoot>
|
||||||
<_RazorMSBuildRoot>$(OriginalProjectRoot)\..\..\..\src\Microsoft.AspNetCore.Razor.Design\bin\{configuration}\netstandard2.0\</_RazorMSBuildRoot>
|
<_RazorMSBuildRoot>$(OriginalProjectRoot)\..\..\..\src\Microsoft.AspNetCore.Razor.Design\bin\{configuration}\netstandard2.0\</_RazorMSBuildRoot>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project=""$(OriginalProjectRoot)\..\..\..\src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props""/>
|
<Import Project=""$(OriginalProjectRoot)\..\..\..\src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props""/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
|
{
|
||||||
|
public class RazorGenerateIntegrationTest : MSBuildIntegrationTestBase
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
[InitializeTestProject("SimpleMvc")]
|
||||||
|
public async Task RazorGenerate_Success_GeneratesFilesOnDisk()
|
||||||
|
{
|
||||||
|
var result = await DotnetMSBuild("RazorGenerate");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
// RazorGenerate should compile the assembly, but not the views.
|
||||||
|
Assert.FileExists(result, IntermediateOutputPath, "SimpleMvc.dll");
|
||||||
|
Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.PrecompiledViews.dll");
|
||||||
|
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "_ViewImports.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "_ViewStart.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "Home", "About.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "Home", "Contact.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "Home", "Index.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "Shared", "_Layout.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "Shared", "_ValidationScriptsPartial.cs");
|
||||||
|
Assert.FileExists(result, RazorIntermediateOutputPath, "Views", "Shared", "Error.cs");
|
||||||
|
Assert.FileCountEquals(result, 8, RazorIntermediateOutputPath, "*.cs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,9 @@
|
||||||
-->
|
-->
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
|
|
||||||
|
<!-- Copy references locally so that we can use them in the test. -->
|
||||||
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -23,6 +26,14 @@
|
||||||
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
|
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- The test projects rely on these binaries being available -->
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="$(MicrosoftAspNetCoreHtmlAbstractionsPackageVersion)" />
|
||||||
|
|
||||||
|
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- We don't need anything in this assembly, we just want to make sure it's built -->
|
<!-- We don't need anything in this assembly, we just want to make sure it's built -->
|
||||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Razor.Design\Microsoft.AspNetCore.Razor.Design.csproj">
|
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Razor.Design\Microsoft.AspNetCore.Razor.Design.csproj">
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,16 @@
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(BinariesRoot)'==''">
|
||||||
<!-- In test scenarios $(OriginalProjectRoot) is defined in a generated Directory.Build.props file -->
|
<!-- In test scenarios $(OriginalProjectRoot) is defined in a generated Directory.Build.props file -->
|
||||||
<ProjectReference Include="$(OriginalProjectRoot)\..\..\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj"/>
|
<ProjectReference Include="$(OriginalProjectRoot)\..\..\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj"/>
|
||||||
<ProjectReference Include="$(OriginalProjectRoot)\..\..\..\src\Microsoft.AspNetCore.Razor.Runtime\Microsoft.AspNetCore.Razor.Runtime.csproj"/>
|
<ProjectReference Include="$(OriginalProjectRoot)\..\..\..\src\Microsoft.AspNetCore.Razor.Runtime\Microsoft.AspNetCore.Razor.Runtime.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||||
|
<Reference Include="$(BinariesRoot)\System.Diagnostics.DiagnosticSource.dll"/>
|
||||||
|
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||||
|
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.dll"/>
|
||||||
|
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.dll"/>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue