CSProj Choose and When Conditions Not Working RRS feed

  • Question

  • User200564 posted


    Our solution is quite complex. We have our own packages via NuGet but also have the ability to refer directly to the source of those packages to decrease turnaround time for debugging of those packages. We give our developers this option via Build Configuration i.e. Debug-Source allows referencing to source while anything else uses the DLL's via NuGet. Problem is, this works fine on Windows, but Xamarin Studio on OS X doesn't like this. In fact, it acts like the references inside the block below do not exist. I've had a look around and can't find others raising this.

    Does Xamarin Studio support the , and flags within CSProj files? And if it does, what might I be missing that is causing it to not find the references that are defined within the CSProj?

    Note: I've changed some of the names below.

        <When Condition="'$(Configuration)' == 'Debug-Source'">
            <ProjectReference Include="Source.csproj">
            <Reference Include="Normal, Version=, Culture=neutral, processorArchitecture=MSIL">
    Tuesday, April 18, 2017 12:59 PM

All replies

  • User31385 posted

    @DanielJGMaclean I haven't used those MSBuild elements, but I did find that the latest Xamarin Studio update (6.3) broke the Condition clause on iOS .csproj files. Prior to that it had been working (although it was already broken on Android projects).

    Thursday, April 20, 2017 10:41 PM