Skip to content

Commit cb6a01e

Browse files
authored
.NET Core 3 Port (#7)
* Migrate to .NET Core 3. * Preparation for package. * Updated Readme and project files. * Another quick update. * Updated Readme. * Move code to a different position. Update NuGets. * Fix up references. * Fixed crash on the Sample App due to broken App.manifest file * Preparation for PR (part 1). * Preparation for PR (part 2). * Update NuGets. * Update packages. * Turn on QuickJIT. * Code Cleanup, remove unnecesary NuGet. * Backported a patch from the original repo. * Move to .NET Core 3.1. * Merge both .NET Core and .NET code into one. * Re-merge with the main repo. * Update TaskDialog.cs * Fix broken merge with the original repo. * Fix .NET Core Sample app. * Merging codebases into one. Part 2. * Moved AssemblyInfo to the csproj file. Added metadata. * Mini cleanup
1 parent 71dbc0d commit cb6a01e

File tree

11 files changed

+137
-362
lines changed

11 files changed

+137
-362
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ _ReSharper*/
3434
#Ignore files created by NUnit
3535
TestResult.xml
3636
*.VisualState.xml
37+
/Ookii.Dialogs.Wpf.NETCore/Properties/PublishProfiles

Ookii.Dialogs.Wpf.sln

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ VisualStudioVersion = 16.0.28803.452
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{85E0D2C3-A700-4A65-BFEA-1F9A29875419}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf.Sample", "sample\Ookii.Dialogs.Wpf.Sample\Ookii.Dialogs.Wpf.Sample.csproj", "{E38181B2-E8E5-466D-9099-33FE75B4CFA1}"
9-
EndProject
108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E248E2C9-CE4A-41D2-91A0-8F61AAB69247}"
119
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf", "src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj", "{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}"
13-
EndProject
1410
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{B2AB57E4-0121-4AF9-A559-C53B442F33D8}"
1511
ProjectSection(SolutionItems) = preProject
1612
.editorconfig = .editorconfig
@@ -21,27 +17,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{B2AB57
2117
README.md = README.md
2218
EndProjectSection
2319
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf", "src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj", "{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}"
21+
EndProject
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ookii.Dialogs.Wpf.Sample", "sample\Ookii.Dialogs.Wpf.Sample\Ookii.Dialogs.Wpf.Sample.csproj", "{E38181B2-E8E5-466D-9099-33FE75B4CFA1}"
23+
EndProject
2424
Global
2525
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2626
Debug|Any CPU = Debug|Any CPU
2727
Release|Any CPU = Release|Any CPU
2828
EndGlobalSection
2929
GlobalSection(ProjectConfigurationPlatforms) = postSolution
30-
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31-
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
32-
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
33-
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Release|Any CPU.Build.0 = Release|Any CPU
3430
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3531
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
3632
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
3733
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Release|Any CPU.Build.0 = Release|Any CPU
3838
EndGlobalSection
3939
GlobalSection(SolutionProperties) = preSolution
4040
HideSolutionNode = FALSE
4141
EndGlobalSection
4242
GlobalSection(NestedProjects) = preSolution
43-
{E38181B2-E8E5-466D-9099-33FE75B4CFA1} = {85E0D2C3-A700-4A65-BFEA-1F9A29875419}
4443
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4} = {E248E2C9-CE4A-41D2-91A0-8F61AAB69247}
44+
{E38181B2-E8E5-466D-9099-33FE75B4CFA1} = {85E0D2C3-A700-4A65-BFEA-1F9A29875419}
4545
EndGlobalSection
4646
GlobalSection(ExtensibilityGlobals) = postSolution
4747
SolutionGuid = {C17C6EF5-4A5E-45BB-AFB9-2D0547C4D682}

sample/Ookii.Dialogs.Wpf.Sample/App.xaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Configuration;
4-
using System.Windows;
1+
using System.Windows;
52

63
namespace Ookii.Dialogs.Wpf.Sample
74
{

sample/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
42
using System.Windows;
5-
using System.Windows.Controls;
6-
using System.Windows.Data;
7-
using System.Windows.Documents;
8-
using System.Windows.Input;
9-
using System.Windows.Media;
10-
using System.Windows.Media.Imaging;
11-
using System.Windows.Navigation;
12-
using System.Windows.Shapes;
133
using System.Threading;
144
using System.ComponentModel;
155

@@ -32,7 +22,7 @@ public MainWindow()
3222
{
3323
InitializeComponent();
3424

35-
_sampleProgressDialog.DoWork += new System.ComponentModel.DoWorkEventHandler(_sampleProgressDialog_DoWork);
25+
_sampleProgressDialog.DoWork += new DoWorkEventHandler(_sampleProgressDialog_DoWork);
3626
}
3727

3828

Lines changed: 27 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,32 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>9.0.30729</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{E38181B2-E8E5-466D-9099-33FE75B4CFA1}</ProjectGuid>
94
<OutputType>WinExe</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>Ookii.Dialogs.Wpf.Sample</RootNamespace>
12-
<AssemblyName>Ookii.Dialogs.Wpf.Sample</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16-
<WarningLevel>4</WarningLevel>
17-
<ApplicationManifest>app.manifest</ApplicationManifest>
5+
<TargetFrameworks>net45;netcoreapp3.1</TargetFrameworks>
6+
<UseWPF>true</UseWPF>
7+
<UseWindowsForms>true</UseWindowsForms>
188
<ApplicationIcon>ookii.ico</ApplicationIcon>
19-
<TargetFrameworkProfile />
20-
</PropertyGroup>
21-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22-
<DebugSymbols>true</DebugSymbols>
23-
<DebugType>full</DebugType>
24-
<Optimize>false</Optimize>
25-
<OutputPath>bin\Debug\</OutputPath>
26-
<DefineConstants>DEBUG;TRACE</DefineConstants>
27-
<ErrorReport>prompt</ErrorReport>
28-
<WarningLevel>4</WarningLevel>
29-
<Prefer32Bit>false</Prefer32Bit>
30-
</PropertyGroup>
31-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32-
<DebugType>pdbonly</DebugType>
33-
<Optimize>true</Optimize>
34-
<OutputPath>bin\Release\</OutputPath>
35-
<DefineConstants>TRACE</DefineConstants>
36-
<ErrorReport>prompt</ErrorReport>
37-
<WarningLevel>4</WarningLevel>
38-
<Prefer32Bit>false</Prefer32Bit>
39-
</PropertyGroup>
40-
<PropertyGroup>
41-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
42-
</PropertyGroup>
43-
<PropertyGroup>
44-
<SignAssembly>true</SignAssembly>
45-
</PropertyGroup>
46-
<PropertyGroup>
47-
<AssemblyOriginatorKeyFile>..\..\assets\ookii-dialogs.snk</AssemblyOriginatorKeyFile>
9+
<Version>1.0.0</Version>
10+
<Company>Ookii.org</Company>
11+
<Authors>Sven Groot</Authors>
12+
<Product>Ookii.Dialogs</Product>
13+
<Description>A sample app that demonstrates how Ookii.Dialogs works.</Description>
14+
<Copyright>Copyright (c) Sven Groot (Ookii.org) 2009</Copyright>
15+
<NeutralLanguage>en</NeutralLanguage>
16+
<AssemblyVersion>1.0.0.20307</AssemblyVersion>
17+
<FileVersion>1.0.0.20307</FileVersion>
18+
<Company>Ookii.org</Company>
19+
<ApplicationManifest>app.manifest</ApplicationManifest>
20+
<StartupObject></StartupObject>
21+
<AssemblyName>Ookii.Dialogs.Wpf.Sample</AssemblyName>
22+
<RootNamespace>Ookii.Dialogs.Wpf.Sample</RootNamespace>
4823
</PropertyGroup>
24+
4925
<ItemGroup>
26+
<ProjectReference Include="..\..\src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj" />
27+
</ItemGroup>
28+
29+
<ItemGroup Condition="$(TargetFramework) == net45">
5030
<Reference Include="System" />
5131
<Reference Include="System.Core" />
5232
<Reference Include="System.Xaml" />
@@ -55,67 +35,6 @@
5535
<Reference Include="PresentationCore" />
5636
<Reference Include="PresentationFramework" />
5737
</ItemGroup>
58-
<ItemGroup>
59-
<ApplicationDefinition Include="App.xaml">
60-
<Generator>MSBuild:Compile</Generator>
61-
<SubType>Designer</SubType>
62-
</ApplicationDefinition>
63-
<Page Include="MainWindow.xaml">
64-
<Generator>MSBuild:Compile</Generator>
65-
<SubType>Designer</SubType>
66-
</Page>
67-
<Compile Include="App.xaml.cs">
68-
<DependentUpon>App.xaml</DependentUpon>
69-
<SubType>Code</SubType>
70-
</Compile>
71-
<Compile Include="MainWindow.xaml.cs">
72-
<DependentUpon>MainWindow.xaml</DependentUpon>
73-
<SubType>Code</SubType>
74-
</Compile>
75-
</ItemGroup>
76-
<ItemGroup>
77-
<Compile Include="Properties\AssemblyInfo.cs">
78-
<SubType>Code</SubType>
79-
</Compile>
80-
<Compile Include="Properties\Resources.Designer.cs">
81-
<AutoGen>True</AutoGen>
82-
<DesignTime>True</DesignTime>
83-
<DependentUpon>Resources.resx</DependentUpon>
84-
</Compile>
85-
<Compile Include="Properties\Settings.Designer.cs">
86-
<AutoGen>True</AutoGen>
87-
<DependentUpon>Settings.settings</DependentUpon>
88-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
89-
</Compile>
90-
<EmbeddedResource Include="Properties\Resources.resx">
91-
<Generator>ResXFileCodeGenerator</Generator>
92-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
93-
</EmbeddedResource>
94-
<None Include="App.config">
95-
<SubType>Designer</SubType>
96-
</None>
97-
<None Include="app.manifest" />
98-
<None Include="Properties\Settings.settings">
99-
<Generator>SettingsSingleFileGenerator</Generator>
100-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
101-
</None>
102-
<AppDesigner Include="Properties\" />
103-
</ItemGroup>
104-
<ItemGroup>
105-
<ProjectReference Include="..\..\src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj">
106-
<Project>{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}</Project>
107-
<Name>Ookii.Dialogs.Wpf</Name>
108-
</ProjectReference>
109-
</ItemGroup>
110-
<ItemGroup>
111-
<Content Include="ookii.ico" />
112-
</ItemGroup>
113-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
114-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
115-
Other similar extension points exist, see Microsoft.Common.targets.
116-
<Target Name="BeforeBuild">
117-
</Target>
118-
<Target Name="AfterBuild">
119-
</Target>
120-
-->
121-
</Project>
38+
39+
40+
</Project>

sample/Ookii.Dialogs.Wpf.Sample/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/Ookii.Dialogs.Wpf/CredentialDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ private static string DecryptPassword(byte[] encrypted)
902902
{
903903
try
904904
{
905-
return System.Text.Encoding.UTF8.GetString(System.Security.Cryptography.ProtectedData.Unprotect(encrypted, null, System.Security.Cryptography.DataProtectionScope.CurrentUser));
905+
return Encoding.UTF8.GetString(System.Security.Cryptography.ProtectedData.Unprotect(encrypted, null, System.Security.Cryptography.DataProtectionScope.CurrentUser));
906906
}
907907
catch( System.Security.Cryptography.CryptographicException )
908908
{

0 commit comments

Comments
 (0)