Skip to content

Commit

Permalink
[msbuild] Add more diagnostic output to FindItemWithLogicalName. (#20376
Browse files Browse the repository at this point in the history
)

I've seen multiple cases of the following error:

> A bundle identifier is required. Either add an 'ApplicationId'
property in the project file, or add a 'CFBundleIdentifier' entry in the
project's Info.plist file.

In all cases this has been been because the build fails to find
Info.plist,
when it's actually there.

One source of this problem was found and fixed with #20374, but that's
not the
problem in other scenarios.

So I'm adding a bit more diagnostic output to the
FindItemWithLogicalName
task, to try to track down why the task fails to find `Info.plist`.
  • Loading branch information
rolfbjarne authored Mar 29, 2024
1 parent 3e56a35 commit 2790602
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,11 @@
{1} - The location the file was found.</comment>
</data>

<data name="M0149b" xml:space="preserve">
<value>Discarded '{0}' with logical name '{1}' because the logical name does not match '{2}'</value>
<comment>{0} - A path to a file.</comment>
</data>

<data name="E0150" xml:space="preserve">
<value> AssemblyPath cannot be null or empty
</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public override bool Execute ()
Item = item;
break;
}
Log.LogMessage (MessageImportance.Low, MSBStrings.M0149b /* "Discarded '{0}' with logical name '{1}' because the logical name does not match '{2}'" */, item.ItemSpec, logical, LogicalName);
}
}

Expand Down

8 comments on commit 2790602

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.