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

ConfigurationPath Error #319

Open Mustafa-ah opened 1 year ago

Mustafa-ah commented 1 year ago

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

Mustafa-ah commented 1 year ago

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>