Fix build break
This commit is contained in:
parent
5bd650bdd1
commit
29bd5f49dd
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
|
|
@ -21,17 +22,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.FileExists(result, OutputPath, "ClassLibrary.dll");
|
||||
Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll");
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.dll")}\" />");
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
// Travis on OSX produces different full paths in C# and MSBuild
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
}
|
||||
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
|
|
@ -52,17 +57,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
Assert.BuildPassed(result);
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.dll")}\" />");
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
// Travis on OSX produces different full paths in C# and MSBuild
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
}
|
||||
|
||||
Assert.NupkgContains(
|
||||
result,
|
||||
|
|
@ -83,16 +92,20 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.FileExists(result, OutputPath, "ClassLibrary.dll");
|
||||
Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll");
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.dll")}\" />");
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
// Travis on OSX produces different full paths in C# and MSBuild
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
@"<files include=""any/netstandard2.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
@"<files include=""any/netstandard2.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
|
||||
}
|
||||
|
||||
Assert.NupkgContains(
|
||||
result,
|
||||
|
|
|
|||
Loading…
Reference in New Issue