question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning in MAUI when referencing a project with GenerateDocumentationFile true

See original GitHub issue

Description

If you create a project reference from a MAUI project to a class library, and that project is generating XML documentation files, you get the following build warnings - two for each reference (one for iOS, one for maccatalyst):

Xamarin.Shared.Sdk.targets(1439, 3): The file '/Users/matt/Code/MyMauiApp/ClassLibrary1/bin/Debug/net6.0/ClassLibrary1.xml' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle.
Xamarin.Shared.Sdk.targets(1439, 3): The file '/Users/matt/Code/MyMauiApp/ClassLibrary1/bin/Debug/net6.0/ClassLibrary1.xml' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle.

Steps to Reproduce

  1. Create a new MAUI app (dotnet new maui, etc.)
  2. Add a class library project to the same solution
  3. Put some XML summary comments on the public members in that class library project.
  4. Set <GenerateDocumentationFile>true</GenerateDocumentationFile> (per this) in the csproj for the class library project
  5. Reference the class library project from the MAUI app.
  6. Compile and see the warnings

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

any

Did you find any workaround?

I think this may be related or similar to https://github.com/xamarin/xamarin-macios/issues/14939, but the workaround there did not work for me, and I’m not sure if this is MAUI specific or not.

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jfversluiscommented, Aug 26, 2022

If it also happens on iOS without .NET MAUI involved then yes please move it there. Thanks!

0reactions
mattjohnsonpintcommented, Aug 1, 2022

FYI, this happens not just on MAUI, but also with an app made via dotnet new ios. Should I close this and open a new issue on https://github.com/xamarin/xamarin-macios?

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSBuild reference for .NET SDK projects
When this property is true , the XML documentation file for the project, if one is generated, is included in the publish output...
Read more >
Project builds in VS, but not in Azure Pipeline, help ...
Thanks @jessehouwing for the comment. The error indicates that Microsoft.NET.Sdk.Razor NuGet package is missing in .csproj file.
Read more >
Maui wildfires: Emergency management chief resigns ...
Maui wildfires: Emergency management chief resigns, citing health reasons, amid questions about sirens' silence during deadly wildfires | CNN.
Read more >
Why weren't Maui residents warned about the fire sooner?
Despite an extensive emergency warning system, Lahaina residents say the wildfire came as a surprise.
Read more >
Maui's EMA chief resigns, citing health reasons, after facing ...
The administrator of Maui's emergency management agency has resigned, citing health reasons, Maui County said in a news release Thursday.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found