Skip to content

Conversation

@JeroMiya
Copy link

PR Details

Updates the Visual Studio workload detection logic for Android and iOS to properly detect the modern post-Xamarin workloads. Also fixes a logical error in IsVSComponentAvailableAnyVersion when multiple versions of Visual Studio are installed, regardless of what order the components are defined in the dictionary: previously, if the first version check fails, it would return false, even if later checks would succeed. Now it checks all entries and returns true if any check succeeds.

Related Issue

#3020
This PR is a partial fix for the above issue. There are still references to Xamarin in a "test" project template, and there are still rendering/fullscreen issues when run in the android emulator. These are out of scope for this PR, which fixes the new project creation process to properly detect the .net for mobile workloads in modern versions of Visual Studio, where Xamarin is no longer installable.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

NOTE: I have not been able to get the project tests to pass, before or after this change. This change does not cause more tests to fail on my machine compared to the master branch. I was also not able to find any tests for this specific part of the code that was changed - understandable given that to fully test this logic, you'd have to run the tests on multiple dev environments with different versions of Visual Studio installed with or without workloads installed. I tested the editor after this change with Visual Studio 2026 installed, with the .net for mobile workloads installed, ran and created a new project with various templates, checking the iOS and Android platforms when creating the project, and verifying the proper android/iOS TFMs are added to the target frameworks for the main "Game" project (some templates use ".Game" suffix, others don't).

NOTE 2: This is my first PR for the Stride project. Apologies if I missed something in the contribution workflow. I did read the docs here: https://doc.stride3d.net/latest/en/contributors/contribution-workflow/index.html

…rly detect the modern post-Xamarin workloads. Also fixes a logical error in IsVSComponentAvailableAnyVersion when multiple versions of Visual Studio are installed, regardless of what order the components are defined in the dictionary: previously, if the first version check fails, it would return false, even if later checks would succeed. Now it checks all entries and returns true if any check succeeds.
@JeroMiya
Copy link
Author

@JeroMiya please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant