|
94 | 94 | <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\NBitcoin.xml</DocumentationFile> |
95 | 95 | </PropertyGroup> |
96 | 96 |
|
97 | | - <!-- 1: Compile Miniscript --> |
98 | | - <!-- This does not work since MSBuild will complain about circular deps --> |
99 | | - <!-- So we must compile NBitcoin.Miniscript manually beforehands --> |
100 | | - <!-- |
101 | | - <Target Name="BuildMiniscript" BeforeTargets="Compile"> |
102 | | - <Message Text="Building Miniscript dll ..." /> |
103 | | - <MSBuild |
104 | | - Projects="../NBitcoin.Miniscript/Miniscript.fsproj" |
105 | | - Properties="Configuration=$(Configuration)" |
106 | | - > |
107 | | - </MSBuild> |
108 | | - </Target> |
109 | | - --> |
110 | | - |
111 | | - <!-- 2: Include compiled Miniscript dll to nupkg. --> |
112 | | - <Target |
113 | | - Name="CopyMiniscriptDll" |
114 | | - BeforeTargets="AfterBuild" |
115 | | - Condition="'$(TargetFramework)' == 'netcoreapp2.1' Or '$(TargetFramework)' == 'netstandard2.0'"> |
116 | | - <Copy |
117 | | - SourceFiles="..\NBitcoin.Miniscript\bin\$(Configuration)\$(TargetFramework)\Miniscript.dll" |
118 | | - DestinationFolder=".\bin\$(Configuration)\$(TargetFramework)" |
119 | | - ContinueOnError="WarnAndContinue" |
120 | | - > |
121 | | - </Copy> |
122 | | - </Target> |
| 97 | + <!-- Include Miniscript dll only if it is ready. --> |
| 98 | + <PropertyGroup> |
| 99 | + <IncludeMiniscript Condition="Exists('..\NBitcoin.Miniscript\bin\$(Configuration)\netstandard2.0\Miniscript.dll')">true</IncludeMiniscript> |
| 100 | + </PropertyGroup> |
| 101 | + <ItemGroup Condition="'$(IncludeMiniscript)' == 'true'"> |
| 102 | + <Content Include="..\NBitcoin.Miniscript\bin\$(Configuration)\netstandard2.0\Miniscript.dll"> |
| 103 | + <Pack>true</Pack> |
| 104 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| 105 | + <PackagePath>lib\netstandard2.0</PackagePath> |
| 106 | + </Content> |
| 107 | + <Content |
| 108 | + Include="..\NBitcoin.Miniscript\bin\$(Configuration)\netcoreapp2.1\Miniscript.dll"> |
| 109 | + <Pack>true</Pack> |
| 110 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| 111 | + <PackagePath>lib\netcoreapp2.1</PackagePath> |
| 112 | + </Content> |
| 113 | + <Content Include="..\NBitcoin.Miniscript\bin\$(Configuration)\net461\Miniscript.dll"> |
| 114 | + <Pack>true</Pack> |
| 115 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| 116 | + <PackagePath>lib\net461</PackagePath> |
| 117 | + </Content> |
| 118 | + </ItemGroup> |
123 | 119 |
|
124 | 120 | </Project> |
0 commit comments