Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perform assembly alias #425

Merged
merged 11 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ jobs:
UNITY_VERSION: ${{ matrix.unity-version }}
run: dotnet build -c Release

- name: Assembly alias
run: |
dotnet tool install --global Alias --version 0.2.0
assemblyalias --target-directory "package-dev/Runtime" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;System*"

- name: Run Unity tests (playmode)
# TODO: Run Play mode tests on 2022 once S.T.J loading issue resolved.
# System.MissingMethodException : Method not found: System.Text.Json.JsonDocument System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory`1<byte>,System.Text.Json.JsonDocumentOptions)
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ package-dev/Plugins/Android/Sentry/*
# Build output of Sentry.Unity
sentry-unity/Assets/Plugins/Sentry/
sentry-unity/Assets/Editor/Sentry/

# ignore temp assemblia alias lookup file
package-dev/alias-references.txt
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Features

- Avoid DLL conflict with other Unity packages ([#425](https://github.com/getsentry/sentry-unity/issues/425))

## 0.6.2

- fix release packaging ([#417](https://github.com/getsentry/sentry-unity/pull/417))
Expand Down
1 change: 1 addition & 0 deletions package-dev/assembly-alias.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assemblyalias --target-directory "Runtime" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;System*"
5 changes: 3 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<Import Project="../Directory.Build.props" />

<PropertyGroup>
<PackageRuntimePath>../../$(DevPackageFolderName)/Runtime</PackageRuntimePath>
<PackageEditorPath>../../$(DevPackageFolderName)/Editor</PackageEditorPath>
<DevPackagePath>../../$(DevPackageFolderName)</DevPackagePath>
<PackageRuntimePath>$(DevPackagePath)/Runtime</PackageRuntimePath>
<PackageEditorPath>$(DevPackagePath)/Editor</PackageEditorPath>
</PropertyGroup>

</Project>
9 changes: 8 additions & 1 deletion src/Sentry.Unity/Sentry.Unity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@
<ItemGroup>
<ProjectReference Include="..\sentry-dotnet\src\Sentry\Sentry.csproj" />
</ItemGroup>


<Target Name="alias-references" AfterTargets="AfterCompile" >
<WriteLinesToFile
File="$(DevPackagePath)/alias-references.txt"
Lines="$(UnityManagedPath)/UnityEngine.dll"
Overwrite="true"/>
</Target>

</Project>