mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-07 20:42:09 -05:00
build: dotnet: strong name assembly and add publisher policy
This commit is contained in:
parent
259f2bf1c1
commit
d9fcc8ca1c
@ -37,6 +37,12 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SignAssembly>true</SignAssembly>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<AssemblyOriginatorKeyFile>winfsp.net.snk</AssemblyOriginatorKeyFile>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -54,6 +60,9 @@
|
|||||||
<Link>Service.cs</Link>
|
<Link>Service.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="winfsp.net.snk" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
@ -77,4 +86,19 @@
|
|||||||
<FileWrites Include="$(IntermediateOutputPath)AssemblyInfo.cs" />
|
<FileWrites Include="$(IntermediateOutputPath)AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>set MyAssemblyPolicyVersion=$(MyAssemblyPolicyVersion)
|
||||||
|
set MyAssemblyVersion=$(MyAssemblyVersion)
|
||||||
|
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
if exist $(OutDir)winfsp.net.policy.xml del $(OutDir)winfsp.net.policy.xml
|
||||||
|
for /f "delims=" %25%25l in ($(ProjectDir)winfsp.net.policy.xml) do (
|
||||||
|
set line=%25%25l
|
||||||
|
echo !line! >>$(OutDir)winfsp.net.policy.xml
|
||||||
|
)
|
||||||
|
|
||||||
|
call "$(DevEnvDir)..\Tools\VsDevCmd.bat"
|
||||||
|
al /link:$(OutDir)winfsp.net.policy.xml /out:$(OutDir)policy.$(MyAssemblyPolicyVersion).$(TargetName).dll /keyfile:$(ProjectDir)$(ProjectName).snk
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
10
build/VStudio/dotnet/winfsp.net.policy.xml
Normal file
10
build/VStudio/dotnet/winfsp.net.policy.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="winfsp-msil" publicKeyToken="b099876d8fa9b1f3" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="!MyAssemblyPolicyVersion!.0.0-!MyAssemblyVersion!" newVersion="!MyAssemblyVersion!" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
BIN
build/VStudio/dotnet/winfsp.net.snk
Normal file
BIN
build/VStudio/dotnet/winfsp.net.snk
Normal file
Binary file not shown.
@ -24,7 +24,8 @@
|
|||||||
<MyVersionWithCommas>$(MyVersion.Replace('.',',')),0</MyVersionWithCommas>
|
<MyVersionWithCommas>$(MyVersion.Replace('.',',')),0</MyVersionWithCommas>
|
||||||
<MyFullVersion>$(MyCanonicalVersion).$(MyBuildNumber).$(MyGitRevision)</MyFullVersion>
|
<MyFullVersion>$(MyCanonicalVersion).$(MyBuildNumber).$(MyGitRevision)</MyFullVersion>
|
||||||
|
|
||||||
<MyAssemblyVersion>$(MyCanonicalVersion.Substring(0,$(MyVersion.IndexOf('.')))).0.0.0</MyAssemblyVersion>
|
<MyAssemblyPolicyVersion>$(MyVersion.Substring(0,$(MyVersion.IndexOf('.')))).0</MyAssemblyPolicyVersion>
|
||||||
|
<MyAssemblyVersion>$(MyVersion).0</MyAssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user