Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET MAUI Project referencing .NET MAUI Class library from a solution produces XA1018 error on build #3978

Closed
jslachta opened this issue Jan 6, 2022 · 1 comment
Labels
platform/android 🤖 s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@jslachta
Copy link

jslachta commented Jan 6, 2022

Description

Hello.

Let us have a solution that has two projects. The first project is .NET MAUI App which references the second project - the .NET MAUI Class library (for example, .NET MAUI library/plugin and a sample project). In this case, the build fails with the following error:

error XA1018: Specified AndroidManifest file does not exist

You can spot this error on VS 17.1.0 Preview 2.0, Microsoft.Maui.* 6.0.101-preview.11.2349.

Steps to Reproduce

  1. Create the .NET MAUI Class library from Visual Studio.
  2. Within the same solution, create .NET MAUI App
  3. Create a project reference from .NET MAUI App to the .NET MAUI Class library
  4. (optional - better for repro) reduce target platforms to Android only
  5. Build
  6. error "XA1018: Specified AndroidManifest file does not exist" occurs

Version with bug

Preview 11

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

all android versions

Did you find any workaround?

I have not found any workaround yet.

Relevant log output

Build started...
1>------ Build started: Project: MauiLib1, Configuration: Debug Any CPU ------
1>You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
1>You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
1>MauiLib1 -> D:\Work\src\MauiLib1\MauiLib1\bin\Debug\net6.0\MauiLib1.dll
1>You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
1>MauiLib1 -> D:\Work\src\MauiLib1\MauiLib1\bin\Debug\net6.0-windows10.0.19041\MauiLib1.dll
1>MauiLib1 -> D:\Work\src\MauiLib1\MauiLib1\bin\Debug\net6.0-android\MauiLib1.dll
2>------ Build started: Project: MauiApp1, Configuration: Debug Any CPU ------
2>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.11.117\tools\Xamarin.Android.Common.targets(511,3): error XA1018: Specified AndroidManifest file does not exist: D:\Work\src\MauiLib1\MauiApp1\MauiApp1\AndroidManifest.xml.
2>Done building project "MauiApp1.csproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
@jslachta jslachta added the t/bug Something isn't working label Jan 6, 2022
@jslachta jslachta changed the title .NET MAUI Project referencing .NET MAUI Class library from a solution produces XA1018 on build .NET MAUI Project referencing .NET MAUI Class library from a solution produces XA1018 error on build Jan 7, 2022
@mattscheffer
Copy link

No repro with 32208.182.main. Both projects built correct. See build log below

1>C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\15.2.301-preview.13.2\tools\msbuild\iOS\Xamarin.Messaging.Apple.targets(31,3): warning : There is no available connection to the Mac. Task 'VerifyXcodeVersion' will not be executed
1>MauiLib1 -> C:\Users\test\source\repos\3978\MauiLib1\bin\Debug\net6.0-maccatalyst\MauiLib1.dll
1>MauiLib1 -> C:\Users\test\source\repos\3978\MauiLib1\bin\Debug\net6.0-ios\MauiLib1.dll
1>MauiLib1 -> C:\Users\test\source\repos\3978\MauiLib1\bin\Debug\net6.0\MauiLib1.dll
1>MauiLib1 -> C:\Users\test\source\repos\3978\MauiLib1\bin\Debug\net6.0-windows10.0.19041\MauiLib1.dll
1>Done building project "MauiLib1.csproj".
1>MauiLib1 -> C:\Users\test\source\repos\3978\MauiLib1\bin\Debug\net6.0-android\MauiLib1.dll
2>------ Build started: Project: 3978, Configuration: Debug Any CPU ------
2>3978 -> C:\Users\test\source\repos\3978\3978\bin\Debug\net6.0-android\3978.dll
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

@samhouts samhouts added the s/triaged Issue has been reviewed label Feb 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/android 🤖 s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants