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

SNOW-991583: Assembly delay sign #956

Merged
merged 2 commits into from
May 29, 2024
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
9 changes: 9 additions & 0 deletions Snowflake.Data.Tests/Snowflake.Data.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<LangVersion>9</LangVersion>
<DefineConstants>$(SEQUENTIAL_ENV)</DefineConstants>
<AssemblyOriginatorKeyFile>..\sign\publicKey.snk</AssemblyOriginatorKeyFile>
sfc-gh-knozderko marked this conversation as resolved.
Show resolved Hide resolved
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JunitXml.TestLogger" Version="3.1.12" />
Expand All @@ -37,6 +40,12 @@
<Reference Include="System.Net.Http.WebRequest" />
</ItemGroup>

<ItemGroup>
<None Include="..\sign\publicKey.snk">
<Link>publicKey.snk</Link>
</None>
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
Expand Down
13 changes: 11 additions & 2 deletions Snowflake.Data/Snowflake.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<Version>3.1.0</Version>
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
<AssemblyOriginatorKeyFile>..\sign\publicKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>
<SignAssembly>true</SignAssembly>
</PropertyGroup>

<ItemGroup>
Expand All @@ -40,9 +43,9 @@
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Release'">
<InternalsVisibleTo Include="Snowflake.Data.Tests" />
<InternalsVisibleTo Include="Snowflake.Data.Tests,PublicKey=0024000004800000940000000602000000240000525341310004000001000100c159643cbf31e9bbbe7920091c39ecbd988b3e102df664830b33f12c9d838b07463682948cb56bbc414311fa019d6bca1dc08bc9d54684667fdd94ddf140f499ccb66795322128ba1804d8342fec912cea2704fe09c82dbf03bf10817330537d57e8177d92c205e93278245d18a84f185c53d1c5d917171c9807ac769ae9dfcb" />
sfc-gh-knozderko marked this conversation as resolved.
Show resolved Hide resolved
<!--needed by Moq to be able to mock internal interfaces-->
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2,PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
sfc-gh-knozderko marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -64,4 +67,10 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<None Include="..\sign\publicKey.snk">
<Link>publicKey.snk</Link>
</None>
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ SET API_KEY=%2
SET ROOT_DIR=%~dp0
cd %ROOT_DIR%

dotnet pack Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n --output %ROOT_DIR%
dotnet build Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n

REM command to sign with strong name Snowflake.Data.dll should be here
sfc-gh-jmartinezramirez marked this conversation as resolved.
Show resolved Hide resolved

dotnet pack Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n --no-build --output %ROOT_DIR%

dotnet nuget push Snowflake.Data.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
Binary file added sign/publicKey.snk
Binary file not shown.
Loading