Add workaround for unknown android designer file

This commit is contained in:
Jérôme Laban 2018-12-06 15:36:17 -05:00
Родитель 2229375f2a
Коммит 0219828a52
2 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -12,3 +12,4 @@
### Breaking changes
### Bug fixes
- Added workaround for missing designer file error with Xamarin.Android projects

Просмотреть файл

@ -148,4 +148,20 @@
</ItemGroup>
</Target>
<Target Name="InvalidAndroidDesignerWorkaround"
AfterTargets="UpdateGeneratedFiles"
Condition=" '$(BuildingInsideUnoSourceGenerator)' != '' and ('$(_UnoSourceGeneratorProjectType)'=='android' or '$(TargetFrameworkIdentifier)'=='MonoAndroid')">
<!--
During the loading of a Xamarin.Android project, when AndroidUseIntermediateDesignerFile is set to true, the
designer file is added to the compilation list, even though it's not present. This makes the msbuild roslyn workspace
try to build this file, raising a error that is not significant as the result of the build is not used.
This target removes that file from the compilation list when the project is loaded inside the source generators
-->
<ItemGroup>
<Compile Remove="$(_AndroidResourceDesignerFile)" />
</ItemGroup>
</Target>
</Project>