AgoraIO-Extensions / AgoraIO-Extensions/Agora-C_Sharp-SDK

Publish conflicts when using agora_rtc_sdk with .NET 9 - Multiple duplicate files with same relative path

Offen
#520 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
34
Forks
13
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Issue Summary
When attempting to publish a .NET 9 WPF application that uses the `agora_rtc_sdk` NuGet package (version 4.2.6.19-alpha.1), the publish process fails due to duplicate file conflicts.

### Error Message
```
Found multiple publish output files with the same relative path:
C:\Users\{User}\.nuget\packages\agora_rtc_sdk\4.2.6.19-alpha.1\build\x64\net40\agorartc.dll,
C:\Users\{User}\.nuget\packages\agora_rtc_sdk\4.2.6.19-alpha.1\build\x64\netcoreapp20\agorartc.dll,
C:\Users\{User}\.nuget\packages\agora_rtc_sdk\4.2.6.19-alpha.1\build\x64\net40\agorartc.pdb,
C:\Users\{User}\.nuget\packages\agora_rtc_sdk\4.2.6.19-alpha.1\build\x64\netcoreapp20\agorartc.pdb
```

### Root Cause
The NuGet package includes both .NET Framework 4.0 (`net40`) and .NET Core 2.0 (`netcoreapp20`) versions of the same files (`agorartc.dll` and `agorartc.pdb`). When publishing a .NET 9 application, both versions are included in the publish output, causing filename conflicts.

### Environment
- **Target Framework**: .NET 9 (net9.0-windows)
- **Project Type**: WPF Application
- **NuGet Package Version**: 4.2.6.19-alpha.1
- **Build Action**: Folder Publish
- **OS**: Windows

### Current Workaround
We've implemented a custom MSBuild target to exclude the .NET Framework 4.0 versions:

```xml



```

### Expected Behavior
The publish process should automatically select the appropriate version of the native libraries based on the target framework without requiring manual intervention or custom MSBuild targets.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.