cake-contrib / Cake.Incubator

This project contains various experimental but useful extension methods and aliases for Cake

Home Page:http://cakebuild.net/api/Cake.Incubator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParseProject overriding the output path doesnot work

christianbumann opened this issue · comments

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <BaseOutputPath>123</BaseOutputPath>
    <OutputPath>123</OutputPath>
  </PropertyGroup>
</Project>

var projectInfo = context.ParseProject(project.Path, "Debug");
projectInfo.OutputPaths[0] // this returns e.g. C:/xyz/src/xyz/bin/Debug/net472'

// Neither setting is working

// If adding the condition it is working as expected

<Project Sdk="Microsoft.NET.Sdk" >
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <BaseOutputPath>123</BaseOutputPath>
    <OutputPath>123</OutputPath>
  </PropertyGroup>
</Project>

var projectInfo = context.ParseProject(project.Path, "Debug");
projectInfo.OutputPaths[0] // this returns e.g. C:/xyz/src/xyz/123/Debug/net472'

Expected Behavior

Return C:/xyz/src/xyz/123/Debug/net472

Imho also settings which were done without this Condition should work, and imho this would be the correct behavior

  1. Use general setting without condition
  2. Overwrite with setting with the condition

Current Behavior

Return C:/xyz/src/xyz/bin/Debug/net472

Additional Information

  • Cake.Inbubator 8.0.0