diff --git a/Cake.Recipe/Content/build.cake b/Cake.Recipe/Content/build.cake index f45e9349..a6d54433 100644 --- a/Cake.Recipe/Content/build.cake +++ b/Cake.Recipe/Content/build.cake @@ -341,7 +341,7 @@ public void CopyBuildOutput() Information("Is a .Net Core Build"); } - if(parsedProject.IsLibrary() && parsedProject.IsXUnitTestProject()) + if(parsedProject.IsLibrary() && (parsedProject.HasPackage("xunit") || parsedProject.HasReference("xunit.core"))) { Information("Project has an output type of library and is an xUnit Test Project: {0}", parsedProject.RootNameSpace); var outputFolder = BuildParameters.Paths.Directories.PublishedxUnitTests.Combine(parsedProject.RootNameSpace); @@ -349,27 +349,27 @@ public void CopyBuildOutput() CopyFiles(GetFiles(parsedProject.OutputPath.FullPath + "/**/*"), outputFolder, true); continue; } - else if(parsedProject.IsLibrary() && parsedProject.IsMSTestProject()) + else if(parsedProject.IsLibrary() && (parsedProject.HasPackage("fixie") || parsedProject.HasReference("fixie"))) { - // We will use vstest.console.exe by default for MSTest Projects - Information("Project has an output type of library and is an MSTest Project: {0}", parsedProject.RootNameSpace); - var outputFolder = BuildParameters.Paths.Directories.PublishedVSTestTests.Combine(parsedProject.RootNameSpace); + Information("Project has an output type of library and is a Fixie Project: {0}", parsedProject.RootNameSpace); + var outputFolder = BuildParameters.Paths.Directories.PublishedFixieTests.Combine(parsedProject.RootNameSpace); EnsureDirectoryExists(outputFolder); CopyFiles(GetFiles(parsedProject.OutputPath.FullPath + "/**/*"), outputFolder, true); continue; } - else if(parsedProject.IsLibrary() && parsedProject.IsFixieTestProject()) + else if(parsedProject.IsLibrary() && (parsedProject.HasPackage("nunit") || parsedProject.HasReference("nunit.framework"))) { - Information("Project has an output type of library and is a Fixie Project: {0}", parsedProject.RootNameSpace); - var outputFolder = BuildParameters.Paths.Directories.PublishedFixieTests.Combine(parsedProject.RootNameSpace); + Information("Project has an output type of library and is a NUnit Test Project: {0}", parsedProject.RootNameSpace); + var outputFolder = BuildParameters.Paths.Directories.PublishedNUnitTests.Combine(parsedProject.RootNameSpace); EnsureDirectoryExists(outputFolder); CopyFiles(GetFiles(parsedProject.OutputPath.FullPath + "/**/*"), outputFolder, true); continue; } - else if(parsedProject.IsLibrary() && parsedProject.IsNUnitTestProject()) + else if(parsedProject.IsLibrary() && parsedProject.IsMSTestProject()) { - Information("Project has an output type of library and is a NUnit Test Project: {0}", parsedProject.RootNameSpace); - var outputFolder = BuildParameters.Paths.Directories.PublishedNUnitTests.Combine(parsedProject.RootNameSpace); + // We will use vstest.console.exe by default for MSTest Projects + Information("Project has an output type of library and is an MSTest Project: {0}", parsedProject.RootNameSpace); + var outputFolder = BuildParameters.Paths.Directories.PublishedVSTestTests.Combine(parsedProject.RootNameSpace); EnsureDirectoryExists(outputFolder); CopyFiles(GetFiles(parsedProject.OutputPath.FullPath + "/**/*"), outputFolder, true); continue;