Description
Copied over from dotnet/runtime#73311
Description
Microsoft.Android.Sdk.DefaultProperties.targets is always settings $(AndroidManifest) to AndroidManifest.xml if empty. Xamarin.Android.Common.targets is settings _AndroidManifestAbs always to $(ProjectDir)$(AndroidManifest) as long as $(AndroidManifest) is not empty.
There is no clean way to set the path to an absolute one (as part of an SDK) besides hooking in before _GetAndroidPackageName and resetting $(AndroidManifest) and defining $(_AndroidManifestAbs) myself. This feels a bit hacky.
Reproduction Steps
Set C:...\AndroidManifest.xml
Expected behavior
'$(_AndroidManifestAbs)' == 'C:...\AndroidManifest.xml'
Actual behavior
'$(_AndroidManifestAbs)' == '$(ProjectDir)C:...\AndroidManifest.xml'
Regression?
No response
Known Workarounds
<_AndroidManifestAbs Condition=" '$(AndroidManifest)' != '' ">$(AndroidManifest)</_AndroidManifestAbs>
Configuration
No response
Other information
No response
Steps to Reproduce
See Description.
@Falco20019 dotnet/maui is already doing exactly what you describe:
https://github.com/dotnet/maui/blob/f1c358800c5276bc16290164eaf98c60f92da9fe/.nuspec/Microsoft.Maui.Controls.SingleProject.targets#L40
Is the problem finding right place to set this value? .NET workloads can probably run .targets in a different order that makes this work.
Did you find any workaround?
No response
Relevant log output
No response
Description
Copied over from dotnet/runtime#73311$(AndroidManifest) to AndroidManifest.xml if empty. Xamarin.Android.Common.targets is settings _AndroidManifestAbs always to $ (ProjectDir)$(AndroidManifest) as long as $(AndroidManifest) is not empty.
Description
Microsoft.Android.Sdk.DefaultProperties.targets is always settings
There is no clean way to set the path to an absolute one (as part of an SDK) besides hooking in before _GetAndroidPackageName and resetting$(AndroidManifest) and defining $ (_AndroidManifestAbs) myself. This feels a bit hacky.
Reproduction Steps
Set C:...\AndroidManifest.xml
Expected behavior
'$(_AndroidManifestAbs)' == 'C:...\AndroidManifest.xml'
Actual behavior
'$(_AndroidManifestAbs)' == '$(ProjectDir)C:...\AndroidManifest.xml'
Regression?
No response
Known Workarounds
<_AndroidManifestAbs Condition=" '$(AndroidManifest)' != '' ">$(AndroidManifest)</_AndroidManifestAbs>
Configuration
No response
Other information
No response
Steps to Reproduce
See Description.
@Falco20019 dotnet/maui is already doing exactly what you describe:
https://github.com/dotnet/maui/blob/f1c358800c5276bc16290164eaf98c60f92da9fe/.nuspec/Microsoft.Maui.Controls.SingleProject.targets#L40
Is the problem finding right place to set this value? .NET workloads can probably run .targets in a different order that makes this work.
Did you find any workaround?
No response
Relevant log output
No response