Skip to content

Commit 799d6af

Browse files
authored
Merge pull request #89 from SixLabors/af/fix-net5-build
Fix compatibility with .NET 5 SDK InternalsVisibleTo
2 parents a324c4f + f6b3d94 commit 799d6af

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ jobs:
5353
git fetch --prune --unshallow
5454
git submodule -q update --init --recursive
5555
56-
- name: Setup DotNet SDK
57-
uses: actions/setup-dotnet@v1
58-
with:
59-
dotnet-version: "3.1.x"
60-
6156
- name: Build
6257
shell: pwsh
6358
run: ./ci-build.ps1 "${{matrix.options.framework}}"
@@ -70,7 +65,7 @@ jobs:
7065
XUNIT_PATH: .\tests\ImageSharp.Drawing.Tests # Required for xunit
7166

7267
- name: Update Codecov
73-
uses: codecov/codecov-action@v1.0.7
68+
uses: codecov/codecov-action@v1
7469
if: matrix.options.codecov == true && startsWith(github.repository, 'SixLabors')
7570
with:
7671
flags: unittests
@@ -96,11 +91,6 @@ jobs:
9691
git fetch --prune --unshallow
9792
git submodule -q update --init --recursive
9893
99-
- name: Setup DotNet SDK
100-
uses: actions/setup-dotnet@v1
101-
with:
102-
dotnet-version: "3.1.x"
103-
10494
- name: Pack
10595
shell: pwsh
10696
run: ./ci-pack.ps1

src/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
<PackageReference Include="StyleCop.Analyzers" IsImplicitlyDefined="true" />
4545

4646
<!-- DynamicProxyGenAssembly2 is needed so Moq can use our internals -->
47-
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" PublicKey="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
48-
<InternalsVisibleTo Include="SixLabors.ImageSharp.Tests" PublicKey="$(SixLaborsPublicKey)" />
49-
<InternalsVisibleTo Include="ImageSharp.Drawing.Benchmarks" PublicKey="$(SixLaborsPublicKey)" />
47+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
48+
<InternalsVisibleTo Include="SixLabors.ImageSharp.Tests" Key="$(SixLaborsPublicKey)" />
49+
<InternalsVisibleTo Include="ImageSharp.Drawing.Benchmarks" Key="$(SixLaborsPublicKey)" />
5050
</ItemGroup>
5151

5252
</Project>

src/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
Condition="'$(Language)' == 'VB' or '$(Language)' == 'C#'"
4747
Inputs="$(MSBuildAllProjects)"
4848
Outputs="$(GeneratedInternalsVisibleToFile)">
49-
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute" AdditionalMetadata="_Parameter1=%(InternalsVisibleTo.Identity)" Condition="'%(InternalsVisibleTo.PublicKey)' == ''">
49+
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute" AdditionalMetadata="_Parameter1=%(InternalsVisibleTo.Identity)" Condition="'%(InternalsVisibleTo.Key)' == ''">
5050
<Output TaskParameter="Include" ItemName="InternalsVisibleToAttribute" />
5151
</CreateItem>
52-
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute" AdditionalMetadata="_Parameter1=%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.PublicKey)" Condition="'%(InternalsVisibleTo.PublicKey)' != ''">
52+
<CreateItem Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute" AdditionalMetadata="_Parameter1=%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)" Condition="'%(InternalsVisibleTo.Key)' != ''">
5353
<Output TaskParameter="Include" ItemName="InternalsVisibleToAttribute" />
5454
</CreateItem>
5555

0 commit comments

Comments
 (0)