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

ConfigurationPath Error

Open Mustafa-ah opened this issue 2 years ago • 1 comments

Description

I need to use mobile.buildtools in a xamarin native project.

here is my solution structure:

-Apps
        --App1
                  ---App1.iOS
                  ---App1.android
         --App2
                   ---App2.iOS
                   ---App2.android
         --Shared
                  --AppShared(PCL)
-Backend
...
-Libs
...

Reproduction Steps

1-install mobile.buildtools(2.0.245) in AppShared(PCL) to be accessible from all mobile apps
2- build AppShared(PCL)

Expected Behavior

Build and generate Appsettings class

Actual Behavior

I get this error after building Shared PCL :

/Users/Mustafa/.nuget/packages/mobile.buildtools/2.0.245/build/Secrets.targets(5,5): Error MSB4044: The "SecretsJsonTask" task was not given a value for the required parameter "ConfigurationPath". (MSB4044)

Environment

  • OS: [OSX 12.6.1 monterey]
  • IDE: [VSMac]
  • BuildTools Version: [2.0.245]
  • IDE Version: [8.10.25]
  • Build Target Framework: [PCL|Xamarin.iOS|Xamarin.Android]

Mustafa-ah avatar Dec 02 '22 12:12 Mustafa-ah

I have found this may help

https://githubmemory.com/repo/dansiegel/Mobile.BuildTools/issues/282

use the following in a Directory.Build.props

<Target Name="MBTHack"
        BeforeTargets="Secrets"
        DependsOnTargets="MobileBuildToolsInit">
</Target>

Mustafa-ah avatar Dec 04 '22 13:12 Mustafa-ah