Build fails of `$(AndroidManifest)` is an absolute path
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
### Android framework version
net8.0-android, net9.0-android
### Affected platform version
All
### Description
Context: https://developercommunity.visualstudio.com/t/Error-code---XA1018--Specified-AndroidMa/10728496
`dotnet build` fails if `$(AndroidManifest)` is an absolute path.
This is likely related to:
https://github.com/dotnet/android/blob/df68c208ad02d09ebb9e6a87053343985dfc1e36/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L572
### Steps to Reproduce
```dotnetcli
% dotnet new android
# this works
% dotnet build *.csproj
# this fails
% dotnet build "-p:AndroidManifest=$(pwd)/AndroidManifest.xml" *.csproj
…
error XA1018: Specified AndroidManifest file does not exist: $(pwd)/$(pwd)/AndroidManifest.xml.
```
### Did you find any workaround?
Don't use an absolute path in `$(AndroidManifest)`.
### Relevant log output
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.