Mobile.BuildTools icon indicating copy to clipboard operation
Mobile.BuildTools copied to clipboard

Unable to get transforms to work for Android Project

Open joebeernink opened this issue 3 years ago • 1 comments

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>
  1. I've tried adding the same files to my TrashMobMobileApp.Android.csproj as both links and direct files
  2. 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.
  • OS: Windows 10
  • IDE: VS2022
  • BuildTools Version: [2.0.245]
  • IDE Version: [17.0.0]
  • Build Target Framework: [netstandard2.1|Xamarin.iOS|Xamarin.Android]

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

joebeernink avatar Nov 27 '21 16:11 joebeernink

@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?

Kalp13 avatar Mar 07 '22 12:03 Kalp13