Skip to content

Commit 8bbe40e

Browse files
Generate (deprecated) Ookii.Dialogs NuGet package matching Ookii.Dialogs.Wpf
Includes a build warning to let users know they should switch to the new package
1 parent 375b666 commit 8bbe40e

File tree

6 files changed

+154
-1
lines changed

6 files changed

+154
-1
lines changed

Ookii.Dialogs.Wpf.sln

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{B2AB57
1212
.editorconfig = .editorconfig
1313
.gitattributes = .gitattributes
1414
.gitignore = .gitignore
15+
build.cake = build.cake
16+
build.cmd = build.cmd
17+
build.ps1 = build.ps1
18+
build.sh = build.sh
19+
cake.config = cake.config
20+
CODEOWNERS = CODEOWNERS
1521
global.json = global.json
1622
LICENSE = LICENSE
1723
nuget.config = nuget.config
@@ -24,6 +30,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ookii.Dialogs.Wpf.Sample",
2430
EndProject
2531
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ookii.Dialogs.Wpf", "src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj", "{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}"
2632
EndProject
33+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs", "src\Ookii.Dialogs\Ookii.Dialogs.csproj", "{50E3F3F4-9AEC-4FF9-8CF9-99721A167EC3}"
34+
EndProject
2735
Global
2836
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2937
Debug|Any CPU = Debug|Any CPU
@@ -38,13 +46,18 @@ Global
3846
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
3947
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
4048
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{50E3F3F4-9AEC-4FF9-8CF9-99721A167EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{50E3F3F4-9AEC-4FF9-8CF9-99721A167EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{50E3F3F4-9AEC-4FF9-8CF9-99721A167EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{50E3F3F4-9AEC-4FF9-8CF9-99721A167EC3}.Release|Any CPU.Build.0 = Release|Any CPU
4153
EndGlobalSection
4254
GlobalSection(SolutionProperties) = preSolution
4355
HideSolutionNode = FALSE
4456
EndGlobalSection
4557
GlobalSection(NestedProjects) = preSolution
4658
{E38181B2-E8E5-466D-9099-33FE75B4CFA1} = {85E0D2C3-A700-4A65-BFEA-1F9A29875419}
4759
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4} = {E248E2C9-CE4A-41D2-91A0-8F61AAB69247}
60+
{50E3F3F4-9AEC-4FF9-8CF9-99721A167EC3} = {E248E2C9-CE4A-41D2-91A0-8F61AAB69247}
4861
EndGlobalSection
4962
GlobalSection(ExtensibilityGlobals) = postSolution
5063
SolutionGuid = {C17C6EF5-4A5E-45BB-AFB9-2D0547C4D682}
6.91 KB
Loading

build.cake

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#addin "nuget:?package=Cake.MinVer&version=0.1.0"
22

3-
var target = Argument<string>("target", "publish");
3+
var target = Argument<string>("target", "pack");
44
var buildVersion = MinVer(s => s.WithTagPrefix("v").WithDefaultPreReleasePhase("preview"));
55

66
Task("clean")
@@ -86,6 +86,19 @@ Task("pack")
8686
args.AppendQuoted($"-p:Version={buildVersion.Version}")
8787
.AppendQuoted($"-p:PackageReleaseNotes={releaseNotes}")
8888
});
89+
90+
DotNetCorePack("./src/Ookii.Dialogs/Ookii.Dialogs.csproj", new DotNetCorePackSettings
91+
{
92+
Configuration = "Release",
93+
NoRestore = true,
94+
NoBuild = true,
95+
IncludeSymbols = false,
96+
IncludeSource = false,
97+
OutputDirectory = "./build/artifacts",
98+
ArgumentCustomization = args =>
99+
args.AppendQuoted($"-p:Version={buildVersion.Version}")
100+
.AppendQuoted($"-p:PackageReleaseNotes={releaseNotes}")
101+
});
89102
});
90103

91104
Task("publish")
+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
5+
<UseWPF>true</UseWPF>
6+
<UseWindowsForms>true</UseWindowsForms>
7+
8+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
9+
<IsPackable>true</IsPackable>
10+
11+
<NoWarn>$(NoWarn);NU5048;NU5128</NoWarn>
12+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
13+
<TreatSpecificWarningsAsErrors />
14+
</PropertyGroup>
15+
16+
<PropertyGroup>
17+
<MinClientVersion>3.3</MinClientVersion>
18+
<PackageId>Ookii.Dialogs</PackageId>
19+
<Version>0.0.1-local</Version>
20+
<Authors>Ookii Dialogs Contributors</Authors>
21+
<Company>augustoproiete.net</Company>
22+
<Description>DEPRECATED. This package has been replaced by the package Ookii.Dialogs.Wpf.</Description>
23+
<Copyright>Copyright (c) 2009-2020 Ookii Dialogs Contributors</Copyright>
24+
<PackageTags>ookii;dialogs;wpf;windows-presentation-foundation;progress-dialog;task-dialog;credential-dialog;common-file-dialog</PackageTags>
25+
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
26+
<PackageIcon>images\icon.png</PackageIcon>
27+
<PackageIconUrl>https://raw.githubusercontent.com/augustoproiete/ookii-dialogs-wpf/master/assets/ookii-dialogs-deprecated-nuget.png</PackageIconUrl>
28+
<PackageProjectUrl>https://github.com/augustoproiete/ookii-dialogs-wpf</PackageProjectUrl>
29+
<PackageReleaseNotes>https://github.com/augustoproiete/ookii-dialogs-wpf/releases</PackageReleaseNotes>
30+
<RepositoryType>git</RepositoryType>
31+
<RepositoryUrl>https://github.com/augustoproiete/ookii-dialogs-wpf.git</RepositoryUrl>
32+
<IncludeBuildOutput>false</IncludeBuildOutput>
33+
</PropertyGroup>
34+
35+
<ItemGroup>
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
37+
</ItemGroup>
38+
39+
<ItemGroup>
40+
<ProjectReference Include="..\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj" />
41+
</ItemGroup>
42+
43+
<ItemGroup>
44+
<None Remove="*.DotSettings" />
45+
</ItemGroup>
46+
47+
<ItemGroup>
48+
<Compile Remove="**\*" />
49+
</ItemGroup>
50+
51+
<ItemGroup>
52+
<Content Include="build\**\*" Pack="true" PackagePath="build" />
53+
<Content Include="buildMultiTargeting\**\*" Pack="true" PackagePath="buildMultiTargeting" />
54+
</ItemGroup>
55+
56+
<ItemGroup>
57+
<None Include="..\..\assets\ookii-dialogs-deprecated-nuget.png" Pack="true" Visible="false" PackagePath="images\icon.png" />
58+
</ItemGroup>
59+
60+
<!--
61+
Workaround to force a [lowerBound, upperBound] version constraint in the ProjectReference
62+
https://github.com/NuGet/Home/issues/5556#issuecomment-585482714
63+
-->
64+
<Target Name="_BoundedProjectReferencesVersion" AfterTargets="_GetProjectReferenceVersions">
65+
<ItemGroup>
66+
<_ProjectReferencesWithBounds Include="@(_ProjectReferencesWithVersions)">
67+
<ProjectVersion>[$(Version)]</ProjectVersion>
68+
</_ProjectReferencesWithBounds>
69+
</ItemGroup>
70+
<ItemGroup>
71+
<_ProjectReferencesWithVersions Remove="@(_ProjectReferencesWithVersions)" />
72+
<_ProjectReferencesWithVersions Include="@(_ProjectReferencesWithBounds)" />
73+
</ItemGroup>
74+
</Target>
75+
76+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!--
2+
***********************************************************************************************
3+
Ookii.Dialogs.targets
4+
5+
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
6+
created a backup copy. Incorrect changes to this file will make it
7+
impossible to load or build your projects from the command-line or the IDE.
8+
9+
This file contains Ookii Dialogs-specific properties, and items.
10+
11+
Copyright (C) Ookii Dialogs Contributors
12+
***********************************************************************************************
13+
-->
14+
15+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
16+
17+
<PropertyGroup>
18+
<MSBuildAllProjects Condition="'$(MSBuildAssemblyVersion)' == '' Or '$(MSBuildAssemblyVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
19+
</PropertyGroup>
20+
21+
<Target Name="OokiiDialogsWarning"
22+
BeforeTargets="BeforeCompile;CoreCompile"
23+
Condition=" '$(DesignTimeBuild)' != 'true' AND '$(BuildingByReSharper)' != 'true' ">
24+
<Warning Code="OKD001"
25+
Text="Ookii.Dialogs is deprecated. You should install the package Ookii.Dialogs.Wpf instead - https://github.com/augustoproiete/ookii-dialogs-wpf" />
26+
</Target>
27+
28+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
***********************************************************************************************
3+
Ookii.Dialogs.targets
4+
5+
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
6+
created a backup copy. Incorrect changes to this file will make it
7+
impossible to load or build your projects from the command-line or the IDE.
8+
9+
This file contains Ookii Dialogs-specific properties, and items.
10+
11+
Copyright (C) Ookii Dialogs Contributors
12+
***********************************************************************************************
13+
-->
14+
15+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
16+
17+
<PropertyGroup>
18+
<MSBuildAllProjects Condition="'$(MSBuildAssemblyVersion)' == '' Or '$(MSBuildAssemblyVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
19+
</PropertyGroup>
20+
21+
<Import Project="../build/Ookii.Dialogs.targets" />
22+
23+
</Project>

0 commit comments

Comments
 (0)