dotnet / dotnet/macios

iOS build errors when AssemblyName contains single quotes

Open
#19,709 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 17h
Merged PRs (30d)
108

Description

### Steps to Reproduce

1. Create a new iOS project via `dotnet new ios`
2. Add the following property to the .csproj: `What's Up`
3. Run `dotnet build`

### Expected Behavior

The app builds successfully.

### Actual Behavior

The build fails with an error:
`/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8490/tools/msbuild/iOS/Xamarin.Shared.targets(2702,3): error MSB4096: The item "@(_WatchAppPostProcessingItems -> 'What's Up.app/Watch/%(Identity)')" in item list "_PostProcessingItem" does not define a value for metadata "DSymName". In order to use this metadata, either qualify it by specifying %(_PostProcessingItem.DSymName), or ensure that all items in this list define a value for this metadata.`

I've seen different errors depending on the project setup, which all seem to stem from the build tool not escaping single quotes.

Changing the AssemblyName to "Whats Up" results in a successful build.

### Environment

Version information

```
> dotnet --version
8.0.100

> dotnet workload list
Installed Workload Id Manifest Version Installation Source
---------------------------------------------------------------------
ios 17.0.8490/8.0.100 SDK 8.0.100
```

### Build Logs

[msbuild.binlog.zip](https://github.com/xamarin/xamarin-macios/files/13757901/msbuild.binlog.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.