mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>winfsp.net.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
@ -54,6 +60,9 @@
|
||||
<Link>Service.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="winfsp.net.snk" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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.
|
||||
@ -77,4 +86,19 @@
|
||||
<FileWrites Include="$(IntermediateOutputPath)AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
</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>
|
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>
|
||||
<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>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user