Project file conditional resources

DavidLambert.7023DavidLambert.7023 David LambertUSMember ✭✭

Hi

I tried to do someting like this in a Xamarin.Mac csproj without success:


or






Could anyone try this as well please?

Best regards,

David

Posts

  • DaveHuntDaveHunt David Hunt USMember ✭✭✭✭✭

    What exactly are you trying that isn't working? Explain what you want to accomplish and show the relevent code/xml that you are using that isn't working. Also explain what you mean by "not working".

    Also, keep in mind that the page you referenced documents Xamarin.iOS-specific features of Xamarin Studio, so there is no guarantee that the features described there will work in a Xamarin.Mac project.

  • DavidLambert.7023DavidLambert.7023 David Lambert USMember ✭✭

    The code disapeared...

    To conditionally remove resources I tried this:

    <BundleResource Include="Resources/Bar-release.png" Condition="'$(Configuration)'='Release'"></BundleResource> <BundleResource Include="Resources/Bar.png" Condition="'$(Configuration)'!='Release'"></BundleResource>

    and

    <ItemGroup Condition="'$(Configuration)'!='Debug'"> <BundleResource Include="Resources/values/strings.xml" /> </ItemGroup> <ItemGroup Condition="'$(Configuration)'=='Debug'"> <BundleResource Include="Resources-Debug/values/strings.xml"/> </ItemGroup>

    Without success.

  • DavidLambert.7023DavidLambert.7023 David Lambert USMember ✭✭

    @DaveHunt, I know that is Xamarin.iOS but as you probably know there is barely any Xamarin.Mac documentation and a lot of support is pointing to iOS.

Sign In or Register to comment.