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!
I've added BuildTools to my existing Xamarin Forms app, added appsettings.json, and configured buildtools but no class with configuration is generated.
Basically, I believe I did everything that should be done by documentation, but no class is generated during the build.
But to be honest, I'm not really sure, where should I put appsettings.json.
If it's an equivalent of appsettings.json from ASP.NET, then it should be placed into the root project, but the docs said "root folder" not the primary project from the solution.
Reproduction Steps
Steps to reproduce the behavior:
Create a Xamarin Forms project
Do the same as it's written above
Build a project
Expected Behavior
After the project builds a configuration class should be generated.
Actual Behavior
No class is generated
Environment
OS: Windows 10
IDE: Rider
BuildTools Version: 2.0.245
IDE Version: Build #RD-222.4167.23, built on September 9, 2022
Build Target Framework: netstandard2.0
Open questions
How to define a path for generated class?
In buildtool.json in the "appSettings" prop there is a key, in my case "MyApp". Does this key have any meaning?
Can I move buildtools.json and appSettings.json to the primary (netstandard2.0) project?
What you have here looks right but this is why you so often see requirements for a sample app that reproduces an issue. It's really impossible for me to tell you why you were having this issue...
Description
I've added BuildTools to my existing Xamarin Forms app, added
appsettings.json
, and configuredbuildtools
but no class with configuration is generated.The folder structure is following:
buildtools.json
file I've extended with the following:And finally the
appsettings.json
Basically, I believe I did everything that should be done by documentation, but no class is generated during the build. But to be honest, I'm not really sure, where should I put appsettings.json. If it's an equivalent of appsettings.json from ASP.NET, then it should be placed into the root project, but the docs said "root folder" not the primary project from the solution.
Reproduction Steps
Steps to reproduce the behavior:
Expected Behavior
After the project builds a configuration class should be generated.
Actual Behavior
No class is generated
Environment
Open questions
buildtool.json
in the "appSettings" prop there is a key, in my case "MyApp". Does this key have any meaning?buildtools.json
andappSettings.json
to the primary (netstandard2.0) project?