22 <Import Project =" ..\Versions.targets.include" />
33 <PropertyGroup >
44 <Title >RocksDbNative</Title >
5- <TargetFrameworks >netstandard1.6;net40;net45 </TargetFrameworks >
5+ <TargetFrameworks >netstandard1.6</TargetFrameworks >
66 <Version >$(RocksDbVersion).$(RocksDbNativeBuild)</Version >
77 <AssemblyVersion >$(Version)</AssemblyVersion >
88 <FileVersion >$(Version)</FileVersion >
2121 </PropertyGroup >
2222 <!-- "DispatchToInnerBuilds" will cause this to run in the outer build (i.e. once regardless of number of frameworks) -->
2323 <!-- Condition="!Exists('rocksdb-$(RocksDbVersion)\runtimes\win-x64\native\rocksdb.dll') and !Exists('$(BaseIntermediateOutputPath)\rocksdb-v$(RocksDbVersion)-win-x64.zip')" -->
24- <Target Name =" DownloadNativeLibs" BeforeTargets =" DispatchToInnerBuilds" >
24+ <!-- Target Name="DownloadNativeLibs" BeforeTargets="DispatchToInnerBuilds"-- >
2525 <!-- Here we download the native libraries from the rocksdb-sharp-native project releases according to the version number, if they don't exist -->
26- <DownloadFile
26+ <!-- DownloadFile
2727 Condition="!Exists('$(BaseIntermediateOutputPath)rocksdb-$(RocksDbVersion)\runtimes\%(NativeLib.RuntimeId)\native\%(NativeLib.Lib)') And !Exists('$(BaseIntermediateOutputPath)rocksdb-v$(RocksDbVersion)-%(NativeLib.RuntimeId).zip')"
2828 SourceUrl="https://github.com/warrenfalk/rocksdb-sharp-native/releases/download/v$(RocksDbVersion)/rocksdb-v$(RocksDbVersion)-%(NativeLib.RuntimeId).zip"
2929 DestinationFolder="$(BaseIntermediateOutputPath)">
3333 SourceFiles="$(BaseIntermediateOutputPath)rocksdb-v$(RocksDbVersion)-%(NativeLib.RuntimeId).zip"
3434 DestinationFolder="$(BaseIntermediateOutputPath)rocksdb-$(RocksDbVersion)\runtimes\%(NativeLib.RuntimeId)\native\">
3535 </Unzip>
36- </Target >
36+ </Target-- >
3737 <ItemGroup >
3838 <!-- Define the native libraries here -->
3939 <!-- The "Include" attribute is a required attribute in ItemGroups outside of Targets, but I don't know why -->
40- <NativeLib Include =" %(RuntimeId)-%(Lib)" RuntimeId =" win-x64" Lib =" rocksdb.dll" />
41- <NativeLib Include =" %(RuntimeId)-%(Lib)" RuntimeId =" linux-x64" Lib =" librocksdb.so" />
42- <NativeLib Include =" %(RuntimeId)-%(Lib)" RuntimeId =" osx-x64" Lib =" librocksdb.dylib" />
40+ <!-- NativeLib Include="%(RuntimeId)-%(Lib)" RuntimeId="win-x64" Lib="rocksdb.dll" /-->
41+ <!-- NativeLib Include="%(RuntimeId)-%(Lib)" RuntimeId="osx-x64" Lib="librocksdb.dylib" /-->
4342 <!-- This "Content" is applied for all "NativeLib" and ensures that it is packaged into the correct folder -->
4443 <!-- This also will cause it to be copied to the output directory, which was so far the only way to get it
4544 to work correctly when referenced using a ProjectReference. When packaged as a nupkg and referenced
4645 with PackageReference, then these go to the runtimes folders in the nuget cache, which is enough for
4746 standard consumers, but framework consumers get them copied from the nuget cache to the output via
4847 the .targets files for those frameworks.-->
49- <Content
50- Include =" @(NativeLib -> '$(BaseIntermediateOutputPath)rocksdb-$(RocksDbVersion)\runtimes\%(RuntimeId)\native\%(Lib)')"
51- PackagePath =" runtimes\%(RuntimeId)\native\%(Lib)"
52- Link =" runtimes\%(RuntimeId)\native\%(Lib)" >
48+ <None Include =" librocksdb.so" >
5349 <Pack >true</Pack >
54- <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
55- </Content >
56- <!-- These target files take care of copying from the nuget cache area into the output folder as required
57- by the .Net Framework frameworks -->
58- <None Remove =" build\**" />
59- <None Include =" build\net40\RocksDbNative.targets" >
60- <Pack >true</Pack >
61- <PackagePath >build/net40</PackagePath >
50+ <PackagePath >runtimes/linux-x64/native</PackagePath >
6251 </None >
63- <None Include =" build\net45\RocksDbNative.targets" >
52+
53+ <None Include =" rocksdb.dll" >
6454 <Pack >true</Pack >
65- <PackagePath >build/net45 </PackagePath >
55+ <PackagePath >runtimes/win-x64/native </PackagePath >
6656 </None >
57+
6758 </ItemGroup >
6859</Project >
0 commit comments