Skip to content

Commit 473c092

Browse files
committed
Add Test for AppendTargetFrameworkToOutputPath false property handling for OutputPath
1 parent 64f54c1 commit 473c092

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/Paket.Tests/ProjectFile/OutputSpecs.fs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ let ``should detect output path for netsdk with outputPath csproj file``
9393
let expected = (System.IO.Path.Combine(@"bin", configuration,"netstandard1.4_bin", target) |> normalizePath)
9494
outPath.ToLowerInvariant() |> shouldEqual (expected.ToLowerInvariant())
9595

96+
[<Test>]
97+
let ``should detect output path for netsdk with outputPath and appendTargetFrameworkToOutputPath false csproj file``
98+
([<Values("MicrosoftNetSdkWithOutputPathAndAppendTargetFrameworkFalse.csprojtest")>] project)
99+
([<Values("Release")>] configuration) =
100+
ensureDir ()
101+
let projectFile = ProjectFile.TryLoad(sprintf "./ProjectFile/TestData/%s" project).Value
102+
let target = projectFile.GetTargetProfiles().Head.ToString()
103+
let outPath = projectFile.GetOutputDirectory configuration "" None
104+
let expected = (System.IO.Path.Combine(@"bin", configuration,"netstandard1.4_bin") |> normalizePath)
105+
outPath.ToLowerInvariant() |> shouldEqual (expected.ToLowerInvariant())
96106

97107
[<Test>]
98108
let ``should detect framework profile for ProjectWithConditions file`` () =
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyName>TestPaket</AssemblyName>
5+
<TargetFramework>netstandard1.4</TargetFramework>
6+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
10+
<OutputPath>bin\Release\netstandard1.4_bin\</OutputPath>
11+
</PropertyGroup>
12+
</Project>

0 commit comments

Comments
 (0)