From a86dfa10b096fc2fa74c20f158a686f6ff3bc955 Mon Sep 17 00:00:00 2001 From: Adam Baxter Date: Wed, 23 Sep 2015 00:10:08 +1000 Subject: [PATCH] Make NuGet package automatically copy native dependencies --- CUE.NET.csproj | 12 +---- CUE.NET.nuspec | 1 + CUE.NET.sln | 6 +++ CUE.NET.targets | 132 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+), 11 deletions(-) create mode 100644 CUE.NET.targets diff --git a/CUE.NET.csproj b/CUE.NET.csproj index 316c99b..03ab634 100644 --- a/CUE.NET.csproj +++ b/CUE.NET.csproj @@ -108,15 +108,5 @@ - - if $(PlatformName) == x86 copy "$(SolutionDir)libs\CUESDK_2013.dll" "$(TargetDir)CUESDK_2013.dll" -if $(PlatformName) == x64 copy "$(SolutionDir)libs\CUESDK.x64_2013.dll" "$(TargetDir)CUESDK.x64_2013.dll" - - + \ No newline at end of file diff --git a/CUE.NET.nuspec b/CUE.NET.nuspec index e9b4b65..5a3028d 100644 --- a/CUE.NET.nuspec +++ b/CUE.NET.nuspec @@ -18,5 +18,6 @@ I'm currently working on this library and it's far from being finished. Please b + \ No newline at end of file diff --git a/CUE.NET.sln b/CUE.NET.sln index 377c477..9cebe01 100644 --- a/CUE.NET.sln +++ b/CUE.NET.sln @@ -9,6 +9,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{1F EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleDevTest", "Examples\SimpleDevTest\SimpleDevTest.csproj", "{7FD88256-5E14-4D7C-862B-7BC2CD04081A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FF50AF6A-D2AC-4772-B013-C10D127DBE29}" + ProjectSection(SolutionItems) = preProject + CUE.NET.nuspec = CUE.NET.nuspec + CUE.NET.targets = CUE.NET.targets + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 diff --git a/CUE.NET.targets b/CUE.NET.targets new file mode 100644 index 0000000..aaf674f --- /dev/null +++ b/CUE.NET.targets @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + %(RecursiveDir)%(FileName)%(Extension) + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bin\%(RecursiveDir)%(Filename)%(Extension) + + + + + + + + + $(PostBuildEventDependsOn); + CopySQLiteInteropFiles; + + + $(BuildDependsOn); + CopySQLiteInteropFiles; + + + $(CleanDependsOn); + CleanSQLiteInteropFiles; + + + + + + + + CollectSQLiteInteropFiles; + $(PipelineCollectFilesPhaseDependsOn); + + +