Search Issue Tracker

Active

Votes

0

Found in

1.5.0-pre.2

Issue ID

UUM-134513

Regression

No

AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing

AI Assistant

-

Steps to reproduce:
1. Create a new project
2. Install com.cysharp.zstring via git URL: https://github.com/Cysharp/ZString.git?path=src/ZString.Unity/Assets/Scripts/ZString
3. Verify the project compiles successfully
4. Install com.unity.ai.assistant@1.6.0-pre.2 via Package Manager
5. Observe: ~100+ compilation errors appear, all CS0103: The name 'Unsafe' does not exist in the current context, originating from ZString source files (FormatHelper.cs, ZString.Concat.cs, DecimalEx.cs, BitOperations.cs, InternalSpanEx.cs, Shims.cs, StringBuilder.AppendJoin.cs, etc.)
6. Uninstall com.unity.ai.assistant -> observe no more compilation errors

Actual result: The AI Assistant's bundled System.Runtime.CompilerServices.Unsafe.dll hijacks the assembly identity, preventing auto-referenced assemblies from resolving the Unsafe type. This breaks any package that uses Unsafe without explicit precompiled references
Expected results: Installing com.unity.ai.assistant should not break compilation of other packages. The framework-provided System.Runtime.CompilerServices.Unsafe type should remain accessible to assemblies using auto-referencing)

Reproducible with: AI Assistant 1.6.0 - pre.2 (6000.0.68f1, 6000.3.8f1, 6000.4.0b9, 6000.5.0a1)
Not reproducible with: AI Assistant 1.6.0 - pre.2 (6000.5.0a2, 6000.5.0a7)
Fixed in: 6000.5.0a2

Environment tested: Windows 11 24H2

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.