Android application type
Android for .NET (net6.0-android31.0)
Affected platform version
VSMac 17.4.4
Description
dotnet pack command is overriding DocumentationFile - Property reassignment: $(DocumentationFile)="SomeFile.xml" (previous value: "") at /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/32.0.485/tools/Xamarin.Android.Bindings.Core.targets (27,5)
<PropertyGroup Condition=" '$(_UseLegacyJavadocImport)' != 'true' ">
<DocumentationFile Condition=" '$(DocumentationFile)' == '' and '$(_ComputeFilesToPublishForRuntimeIdentifiers)' != 'true' ">$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<NoWarn Condition=" '$(DocumentationFile)' != '' ">$(NoWarn);CS1573;CS1591</NoWarn>
</PropertyGroup>
https://github.com/xamarin/xamarin-android/blame/b1232a2bf2e8d0cb2163c15c24af5023d5004d65/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.Core.targets#L31
_UseLegacyJavadocImport is empty
DocumentationFile is empty
and global GenerateDocumentationFile is not honored at all.
Was able to disable this behaviour by setting _UseLegacyJavadocImport to true but don't know if it should work this way and what are future implications.
See discord discussion for reference: https://discord.com/channels/732297728826277939/732297837953679412/1070672188996337705
Steps to Reproduce
- Create Android Java Library Binding solution.
- Add some documentation over e.g. addition partial item
namespace some.namespace
{
public partial class Test
{
/// <summary>
/// Get the version in major.minor.build format.
/// </summary>
public static string SomeVersion { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
- Disable XML generation by leaving empty
DocumentationFile or setting GenerateDocumentationFile false which should disable any documentation.
dotnet pack solution and observe that DocumentationFile is overridden in the log and XML file is generated inside nupkg
Did you find any workaround?
It could be disabled by setting undocumented flag that was added by some other means:
Was able to disable this behaviour by setting _UseLegacyJavadocImport to true but don't know if it should work this way and what are future implications.
Relevant log output
`Property reassignment: $(DocumentationFile)="SomeFile.xml" (previous value: "") at /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/32.0.485/tools/Xamarin.Android.Bindings.Core.targets (27,5)`
Android application type
Android for .NET (net6.0-android31.0)
Affected platform version
VSMac 17.4.4
Description
dotnet packcommand is overriding DocumentationFile -Property reassignment: $(DocumentationFile)="SomeFile.xml" (previous value: "") at /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/32.0.485/tools/Xamarin.Android.Bindings.Core.targets (27,5)https://github.com/xamarin/xamarin-android/blame/b1232a2bf2e8d0cb2163c15c24af5023d5004d65/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.Core.targets#L31
_UseLegacyJavadocImportis emptyDocumentationFileis emptyand global
GenerateDocumentationFileis not honored at all.Was able to disable this behaviour by setting
_UseLegacyJavadocImportto true but don't know if it should work this way and what are future implications.See discord discussion for reference: https://discord.com/channels/732297728826277939/732297837953679412/1070672188996337705
Steps to Reproduce
DocumentationFileor settingGenerateDocumentationFilefalse which should disable any documentation.dotnet packsolution and observe thatDocumentationFileis overridden in the log and XML file is generated inside nupkgDid you find any workaround?
It could be disabled by setting undocumented flag that was added by some other means:
Was able to disable this behaviour by setting
_UseLegacyJavadocImportto true but don't know if it should work this way and what are future implications.Relevant log output
`Property reassignment: $(DocumentationFile)="SomeFile.xml" (previous value: "") at /usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/32.0.485/tools/Xamarin.Android.Bindings.Core.targets (27,5)`