Skip to content

Commit 76032fe

Browse files
author
msftbot[bot]
authored
Fixed local errors in .NET Core 2.1 unit tests (#3365)
## PR Type What kind of change does this PR introduce? <!-- Please uncomment one or more that apply to this PR. --> - Bugfix - Build or CI related changes <!-- - Documentation content changes --> <!-- - Sample app changes --> <!-- - Other... Please describe: --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Some .NET Core 2.1 unit tests for the base package fail when run locally. ## What is the new behavior? <!-- Describe how was this issue resolved or changed? --> All tests run correctly when executed locally. ## PR Checklist Please check if your PR fulfills the following requirements: - [X] Tested code with current [supported SDKs](../readme.md#supported) - [ ] ~~Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->~~ - [ ] ~~Sample in sample app has been added / updated (for bug fixes / features)~~ - [ ] ~~Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~ - [X] Tests for the changes have been added (for bug fixes / features) (if applicable) - [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*) - [X] Contains **NO** breaking changes <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. Please note that breaking changes are likely to be rejected. -->
2 parents 41f474e + b39dcef commit 76032fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
1313
</ItemGroup>
1414

15+
<!-- Workaround for the .NET Core 2.1 binary not resolving the Unsafe assembly properly -->
16+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
17+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
18+
</ItemGroup>
19+
1520
<ItemGroup>
1621
<ProjectReference Include="..\..\Microsoft.Toolkit\Microsoft.Toolkit.csproj" />
1722
</ItemGroup>

0 commit comments

Comments
 (0)