-
Notifications
You must be signed in to change notification settings - Fork 538
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] fix AndroidGenerateResourceDesigner (#7721
) Context: dc3ccf2 Context: dotnet/maui#12520 When `_Microsoft.Android.Resource.Designer.dll` is used (dc3ccf2) and [`$(AndroidGenerateResourceDesigner)`][0]=False, the `__Microsoft.Android.Resource.Designer.cs` file is still generated, which is *equivalent* to `Resource.designer.cs`. This causes a `Resource` type to be generated. This showed up when attempting to bump MAUI to use xamarin-android for .NET 8 (dotnet/maui#12520), which [introduced][1] *lots* of `*.Resource` types which are *not desirable*. Fix this so that when `$(AndroidGenerateResourceDesigner)`=False the `__Microsoft.Android.Resource.Designer.*` files are *not* created. This prevents `*.Resource` types from being added to the assembly. Note that `_Microsoft.Android.Resource.Designer.dll` is still created at build time. A unit test has been updated to test this change. [0]: https://learn.microsoft.com/en-us/xamarin/android/deploy-test/building-apps/build-properties#androidgenerateresourcedesigner [1]: dotnet/maui@2e49812
- Loading branch information
1 parent
5c4e97b
commit 953cd19
Showing
3 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters