Bitrise Xamarin Build Configurations in multiple submodules / projects - xamarin

I have an app for ios and android written in Xamarin which I am trying to build with Bitrise.
In the platform project I have 10 build configurations for different releases of the app. In the two submodule projects I have simply a debug & release configuration (and debug|iPhone & simulator on the ios project) - these projects don't need to know about which release of the app is going out - the build config's are for resources and manifest/plist details.
In the solution I use configurations mappings to specify what build config should be used for the submodule projects, i.e.
Solution Configuration : Release_a_particular_version
Platform project maps to : Release_a_particular_version
Core project maps to : Release
Submodule Library maps to : Release
This builds fine in Xamarin Studio or Visual Studio but when building in Bitrise gets an error, project configuration not found.
If I create configurations in both submodules with the same name as the solution_configuration everything builds well.
I imagine there's an msbuild switch to turn configuration mapping on? If there is, how would I apply that to the bitrise build step?
Or some alternative?

Without your Bitrise configuration and the failed build log, it is hard to answer this question.
To help you, we would need to take a look on your configuration and on the failed build log.
You can reach out our support team on Bitrise on-site-chat (on every Bitrise page you can find a message icon in the lower right corner where you can send us a message).

Related

Updates to code on Xamarin iOS application are not applying at runtime/debug

I have an application which I am developing. Everything has been going smoothly, but suddenly my code no longer applies when I deploy. If I make a change and deploy the app to my iPhone, the app launches but my changes do not appear.
Furthermore, my breakpoints hollow, which I believe means that the code that is running differs from the code in Visual Studio.
I am running Visual Studio 2022 on Mac, deploying to my iphone hardware.
I have tried:
Normal build and run
Build -> Rebuild Solution
How can I solve this problem?
I was able to solve the problem with the following steps:
Open the location of my iOS project (note that I also have Android projects and other libraries, but I only did this for the iOS location)
Delete the bin and obj folders
Build project, observe there are now errors due to references missing to classes which should come from nuget packages
Right-click on the Packages folder in the solution explorer and select Restore
Build and deploy the project
I'm not sure why my project got in this state, but this seems to solve it when it does happen.

DevOps Linking Project Dependency from another Solution

I'm receiving a build error in DevOps for a .Net Core 3 web application using a project dependent Razor Class Library from another solution.
For the DevOps pipeline, I receive the following build solution error:
##[error]d:\a\1\s\consumer.app.sln.metaproj(0,0): Error MSB3202: The project file "d:\a\1\s\..\framework.app\framework.rcl\framework.rcl.csproj" was not found.
I have another pipeline for the framework.app project (which also uses framework.rcl as a project dependency) but because the framework.rcl project is within that solution (and the same repo), it works flawlessly.
Is there any way (preferably without nuget) to access the framework.rcl razor class library from the consumer.app pipeline?
Everything works perfect locally as the project has been added in visual studio (via Add Existing project), but obviously that linked project is not included in source control for the consumer.app solution.
Please Help :)
I tripped over myself here. I was deep into managing project dependencies and using Azure Artifacts to do so.
However, the problem here wasn't a dependency issue. Msbuild in the Azure DevOps pipeline was simply trying to build a shared project used in the solution that wasn't available in the repo.
In Visual Studio, I simply unticked the build for the 'Release' configuration in Configuration Manager and DevOps no longer wants to build it.
I get a warning, but no error and my package reference to my Azure artifact (nuget) ensures everything wires up correctly.

TeamCity continues to build projects that have been excluded from my Visual Studio solution configuration

My Visual Studio 2019 solution contains several projects, some of which I don't want to be built as part of continuous integration. Specifically, I'm trying to exclude tooling and unit tests.
In Visual Studio, I have created a new solution configuration and unchecked the "Build" box for each project I don't want to be built.
In TeamCity, I have specified the name of the new solution configuration to use. However, TeamCity continues to attempt to build all projects within the solution.
[I had included screenshots of my solution configuration, TeamCity build configuration, and resulting TeamCity log but I do not have enough reputation to post images apparently.]
From everything I could find so far, unchecking "Build" from the solution configuration used by TeamCity is supposed to exclude that project from building.
I figured it out by finally noticing that the TeamCity log was showing the build configuration as "ReleaseCI|Mixed Platforms" instead of "ReleaseCI|Any CPU". On other projects, I only needed to specify the configuration. For this project, I apparently have to specify the platform as well.

How to setup a software project so that different cross compile targets for the project map to diff. TFS branches of a single project

IDE= Visual Studio 2017 Community
How can I setup a software project so that different cross compile targets for the project map to diff. TFS branches of a single project.
Another related query how to map debug and release versions for one compile target, taking into account previous query above, in VS hosted TFS online.
I assume you mean configuration and platform, you don’t need to do it, also it is based on the configuration and platform you selected in Visual Studio, you just need to change the configuration and platform before build the project.
Refer to these steps to configure configuration and platform for each project.
Right click solution > Configuration Manager
Choose configuration and platform for solution
Choose configuration and platform for projects
Change configuration and platform for solution in Visual Studio
Build the solution or just the project

gradle directory in an Android Studio project

There is a directory called gradle in my Android Studio project. They don't say it should be excluded from version control. What is in this directory?
Update #1.
Android Studio bug. It updates gradle/wrapper/gradle-wrapper.properties every time I run it.
The directory gradle having a Gradle Wrapper inside it
The wrapper is something you should check into version control. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand.
Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with. Of course, this is also great for continuous integration servers (i.e. servers that regularly build your project) as it requires no configuration on the server.
That is why it is not excluded from version control.

Resources