dansiegel / Mobile.BuildTools

The Mobile.BuildTools makes it easier to develop code bases in a clean, consistent, secure, and configurable way. Determine at Build which environment your app needs to run on, and what Client Secrets it should have. Plus many more amazing features!
http://mobilebuildtools.com
MIT License
228 stars 29 forks source link

Unable to get transforms to work for Android Project #294

Open joebeernink opened 2 years ago

joebeernink commented 2 years ago

Description

I'm new to using this package, so I'm betting this is a misunderstanding of the docs. Wondering if I'm putting the files in the wrong place to start with, or not giving them the proper build attributes:

  1. I have an app.config in my Xamarin.Forms project (TrashMobMobile.csproj) with a single setting in it "TrashMobRootUrl"
  2. In my TrashMobMobile.csproj, I have the following:
    <ItemGroup>
      <Content Update="app.config" />
      <Content Update="app.debug.config">
          <DependentUpon>App.config</DependentUpon>
      </Content>
      <Content Update="app.release.config">
          <DependentUpon>App.config</DependentUpon>
      </Content>
    </ItemGroup>
  3. I've tried adding the same files to my TrashMobMobileApp.Android.csproj as both links and direct files
  4. When I try to start my Android application in a local emulator, it never runs the transform. If I just put the app.config file in the TrashMobMobile.Android.csproj with a value, it works, but I really need different builds to point to different backend Urls.

Reproduction App

Please include a sample app that reproduces the issue and/or a binlog. Failure to reproduce either of these may lead to the issue being closed or ignored.

Here is the github branch I am working in for the development. I appreciate any guidance you can provide on how to get this to work. If there is a better way to do this type of thing, please let me know).

https://github.com/joebeernink/TrashMob/tree/dev/jobee%2Faddflyout

Kalp13 commented 2 years ago

@joebeernink were you able to find a solution to this problem? I am facing the same issue and I have tried a lot of different things that aren't working at all. I have tried copying the sample config app to the T, but it isn't working on my local PC or in AppCentre.

Do you perhaps have a workaround or a different way to accomplish this?