|
137 | 137 | <PaketRestoreCachedSplitObject Include="$([System.Text.RegularExpressions.Regex]::Split(`$(PaketRestoreCachedContents)`, `{|}|,`))"></PaketRestoreCachedSplitObject>
|
138 | 138 | <!-- Keep Key, Value ItemGroup-->
|
139 | 139 | <PaketRestoreCachedKeyValue Include="@(PaketRestoreCachedSplitObject)"
|
140 |
| - Condition=" $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`).Length) > 1 "> |
| 140 | + Condition=" $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`).Length) > 1 "> |
141 | 141 | <Key>$([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``))</Key>
|
142 | 142 | <Value>$([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``))</Value>
|
143 | 143 | </PaketRestoreCachedKeyValue>
|
|
241 | 241 | <OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) >= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
|
242 | 242 | <ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) >= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
|
243 | 243 | <Aliases Condition="%(PaketReferencesFileLinesInfo.Splits) >= 9">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])</Aliases>
|
| 244 | + <ReferenceCondition Condition="%(PaketReferencesFileLinesInfo.Splits) >= 10">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[9])</ReferenceCondition> |
244 | 245 | </PaketReferencesFileLinesInfo>
|
245 |
| - <PackageReference Condition=" '$(ManagePackageVersionsCentrally)' != 'true' Or '%(PaketReferencesFileLinesInfo.Reference)' == 'Direct' " Include="%(PaketReferencesFileLinesInfo.PackageName)"> |
| 246 | + <PackageReference Condition=" ('$(ManagePackageVersionsCentrally)' != 'true' Or '%(PaketReferencesFileLinesInfo.Reference)' == 'Direct') AND ('%(PaketReferencesFileLinesInfo.ReferenceCondition)' == 'true' Or $(%(PaketReferencesFileLinesInfo.ReferenceCondition)) == 'true')" Include="%(PaketReferencesFileLinesInfo.PackageName)"> |
246 | 247 | <Version Condition=" '$(ManagePackageVersionsCentrally)' != 'true' ">%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
|
247 | 248 | <PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
|
248 | 249 | <ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
|
|
251 | 252 | <Aliases Condition=" %(PaketReferencesFileLinesInfo.Aliases) != ''">%(PaketReferencesFileLinesInfo.Aliases)</Aliases>
|
252 | 253 | <Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
|
253 | 254 | <AllowExplicitVersion>true</AllowExplicitVersion>
|
254 |
| - |
255 | 255 | </PackageReference>
|
256 |
| - |
257 | 256 | <PackageVersion Include="%(PaketReferencesFileLinesInfo.PackageName)">
|
258 | 257 | <Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
|
259 | 258 | </PackageVersion>
|
|
319 | 318 | </ItemGroup>
|
320 | 319 |
|
321 | 320 | <Error Text="Error Because of PAKET_ERROR_ON_MSBUILD_EXEC (not calling fix-nuspecs)" Condition=" '$(PAKET_ERROR_ON_MSBUILD_EXEC)' == 'true' " />
|
322 |
| - <Exec Condition="@(_NuspecFiles) != ''" Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" ' /> |
| 321 | + <Exec Condition="@(_NuspecFiles) != ''" Command='$(PaketCommand) show-conditions -s' ConsoleToMSBuild="true" StandardOutputImportance="low"> |
| 322 | + <Output TaskParameter="ConsoleOutput" ItemName="_ConditionProperties"/> |
| 323 | + </Exec> |
| 324 | + <ItemGroup> |
| 325 | + <_DefinedConditionProperties Include="@(_ConditionProperties)" Condition="$(%(Identity)) == 'true'"/> |
| 326 | + </ItemGroup> |
| 327 | + <PropertyGroup> |
| 328 | + <_ConditionsParameter></_ConditionsParameter> |
| 329 | + <_ConditionsParameter Condition="@(_DefinedConditionProperties) != ''">--conditions @(_DefinedConditionProperties)</_ConditionsParameter> |
| 330 | + </PropertyGroup> |
| 331 | + <Exec Condition="@(_NuspecFiles) != ''" Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" $(_ConditionsParameter)' /> |
323 | 332 | <Error Condition="@(_NuspecFiles) == ''" Text='Could not find nuspec files in "$(AdjustedNuspecOutputPath)" (Version: "$(PackageVersion)"), therefore we cannot call "paket fix-nuspecs" and have to error out!' />
|
324 | 333 |
|
325 | 334 | <ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
|
326 | 335 | <Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
|
327 | 336 | </ConvertToAbsolutePath>
|
328 | 337 |
|
329 |
| - <!-- Call Pack --> |
330 |
| - <PackTask Condition="$(UseMSBuild16_10_Pack)" |
331 |
| - PackItem="$(PackProjectInputFile)" |
332 |
| - PackageFiles="@(_PackageFiles)" |
333 |
| - PackageFilesToExclude="@(_PackageFilesToExclude)" |
334 |
| - PackageVersion="$(PackageVersion)" |
335 |
| - PackageId="$(PackageId)" |
336 |
| - Title="$(Title)" |
337 |
| - Authors="$(Authors)" |
338 |
| - Description="$(Description)" |
339 |
| - Copyright="$(Copyright)" |
340 |
| - RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)" |
341 |
| - LicenseUrl="$(PackageLicenseUrl)" |
342 |
| - ProjectUrl="$(PackageProjectUrl)" |
343 |
| - IconUrl="$(PackageIconUrl)" |
344 |
| - ReleaseNotes="$(PackageReleaseNotes)" |
345 |
| - Tags="$(PackageTags)" |
346 |
| - DevelopmentDependency="$(DevelopmentDependency)" |
347 |
| - BuildOutputInPackage="@(_BuildOutputInPackage)" |
348 |
| - TargetPathsToSymbols="@(_TargetPathsToSymbols)" |
349 |
| - SymbolPackageFormat="$(SymbolPackageFormat)" |
350 |
| - TargetFrameworks="@(_TargetFrameworks)" |
351 |
| - AssemblyName="$(AssemblyName)" |
352 |
| - PackageOutputPath="$(PackageOutputAbsolutePath)" |
353 |
| - IncludeSymbols="$(IncludeSymbols)" |
354 |
| - IncludeSource="$(IncludeSource)" |
355 |
| - PackageTypes="$(PackageType)" |
356 |
| - IsTool="$(IsTool)" |
357 |
| - RepositoryUrl="$(RepositoryUrl)" |
358 |
| - RepositoryType="$(RepositoryType)" |
359 |
| - SourceFiles="@(_SourceFiles->Distinct())" |
360 |
| - NoPackageAnalysis="$(NoPackageAnalysis)" |
361 |
| - MinClientVersion="$(MinClientVersion)" |
362 |
| - Serviceable="$(Serviceable)" |
363 |
| - FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)" |
364 |
| - ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)" |
365 |
| - NuspecOutputPath="$(AdjustedNuspecOutputPath)" |
366 |
| - IncludeBuildOutput="$(IncludeBuildOutput)" |
367 |
| - BuildOutputFolders="$(BuildOutputTargetFolder)" |
368 |
| - ContentTargetFolders="$(ContentTargetFolders)" |
369 |
| - RestoreOutputPath="$(RestoreOutputAbsolutePath)" |
370 |
| - NuspecFile="$(NuspecFileAbsolutePath)" |
371 |
| - NuspecBasePath="$(NuspecBasePath)" |
372 |
| - NuspecProperties="$(NuspecProperties)" |
373 |
| - PackageLicenseFile="$(PackageLicenseFile)" |
374 |
| - PackageLicenseExpression="$(PackageLicenseExpression)" |
375 |
| - PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" |
376 |
| - Readme="$(PackageReadmeFile)" |
377 |
| - NoDefaultExcludes="$(NoDefaultExcludes)"/> |
| 338 | + <!-- Call Pack --> |
| 339 | + <PackTask Condition="$(UseMSBuild16_10_Pack)" |
| 340 | + PackItem="$(PackProjectInputFile)" |
| 341 | + PackageFiles="@(_PackageFiles)" |
| 342 | + PackageFilesToExclude="@(_PackageFilesToExclude)" |
| 343 | + PackageVersion="$(PackageVersion)" |
| 344 | + PackageId="$(PackageId)" |
| 345 | + Title="$(Title)" |
| 346 | + Authors="$(Authors)" |
| 347 | + Description="$(Description)" |
| 348 | + Copyright="$(Copyright)" |
| 349 | + RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)" |
| 350 | + LicenseUrl="$(PackageLicenseUrl)" |
| 351 | + ProjectUrl="$(PackageProjectUrl)" |
| 352 | + IconUrl="$(PackageIconUrl)" |
| 353 | + ReleaseNotes="$(PackageReleaseNotes)" |
| 354 | + Tags="$(PackageTags)" |
| 355 | + DevelopmentDependency="$(DevelopmentDependency)" |
| 356 | + BuildOutputInPackage="@(_BuildOutputInPackage)" |
| 357 | + TargetPathsToSymbols="@(_TargetPathsToSymbols)" |
| 358 | + SymbolPackageFormat="$(SymbolPackageFormat)" |
| 359 | + TargetFrameworks="@(_TargetFrameworks)" |
| 360 | + AssemblyName="$(AssemblyName)" |
| 361 | + PackageOutputPath="$(PackageOutputAbsolutePath)" |
| 362 | + IncludeSymbols="$(IncludeSymbols)" |
| 363 | + IncludeSource="$(IncludeSource)" |
| 364 | + PackageTypes="$(PackageType)" |
| 365 | + IsTool="$(IsTool)" |
| 366 | + RepositoryUrl="$(RepositoryUrl)" |
| 367 | + RepositoryType="$(RepositoryType)" |
| 368 | + SourceFiles="@(_SourceFiles->Distinct())" |
| 369 | + NoPackageAnalysis="$(NoPackageAnalysis)" |
| 370 | + MinClientVersion="$(MinClientVersion)" |
| 371 | + Serviceable="$(Serviceable)" |
| 372 | + FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)" |
| 373 | + ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)" |
| 374 | + NuspecOutputPath="$(AdjustedNuspecOutputPath)" |
| 375 | + IncludeBuildOutput="$(IncludeBuildOutput)" |
| 376 | + BuildOutputFolders="$(BuildOutputTargetFolder)" |
| 377 | + ContentTargetFolders="$(ContentTargetFolders)" |
| 378 | + RestoreOutputPath="$(RestoreOutputAbsolutePath)" |
| 379 | + NuspecFile="$(NuspecFileAbsolutePath)" |
| 380 | + NuspecBasePath="$(NuspecBasePath)" |
| 381 | + NuspecProperties="$(NuspecProperties)" |
| 382 | + PackageLicenseFile="$(PackageLicenseFile)" |
| 383 | + PackageLicenseExpression="$(PackageLicenseExpression)" |
| 384 | + PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" |
| 385 | + Readme="$(PackageReadmeFile)" |
| 386 | + NoDefaultExcludes="$(NoDefaultExcludes)"/> |
378 | 387 |
|
379 | 388 | <PackTask Condition="$(UseMSBuild16_0_Pack)"
|
380 | 389 | PackItem="$(PackProjectInputFile)"
|
|
0 commit comments