Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] $DOTNET_MODIFIABLE_ASSEMBLIES & FastDev (…
…#9451) Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10431207&view=ms.vss-test-web.build-test-results-tab&runId=114098346&resultId=100000&paneView=debug The `FastDeployEnvironmentFiles(false)` test fails on PRs from forks, because the "Fast Deployment" feature is not included in OSS builds: The Environment variable "DOTNET_MODIFIABLE_ASSEMBLIES" was not set. Expected: String containing "DOTNET_MODIFIABLE_ASSEMBLIES=Debug" But was: "--------- beginning of main … The problem appears to be related to target ordering: * `_GetGenerateJavaStubsInputs` : uses `@(AndroidEnvironment)` to set `@(_EnvironmentFiles)` * `_GetGenerateJavaStubs` : must have same `Inputs` as `_GeneratePackageManagerJava` * `_GeneratePackageManagerJava`: actually uses `@(_EnvironmentFiles)` * `_GenerateEnvironmentFiles` : creates a new `@(AndroidEnvironment)` file that won't be used! But when using either a `Release` build or `Debug` build with `FastDev` enabled, everything works fine. To fix this, rework the target ordering: * `_GetGenerateJavaStubsInputs` depends on `_GenerateEnvironmentFiles` Unfortunately, this is now a circular dependency that causes an MSBuild error. * Break the cycle by updating `_GenerateEnvironmentFiles` to no longer depend upon `_ReadAndroidManifest`. It does not appear that `_ReadAndroidManifest` is needed by `_GenerateEnvironmentFiles`, as no properties created there are used.
- Loading branch information