diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af0d59d..5d9893e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,11 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # Install the .NET Core workload - name: Install .NET Core - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: 8.0.x @@ -28,7 +28,7 @@ jobs: # Upload docs site: https://github.com/marketplace/actions/upload-a-build-artifact - name: Upload Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: bin path: bin \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 59e6fe5..a2dd163 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,13 +18,13 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # Install the .NET Core workload - name: Install .NET Core - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x # Add DevExpress source: https://docs.devexpress.com/GeneralInformation/117209/installation/install-devexpress-controls-using-nuget-packages/manage-packages-with-dotnet-cli - name: Add DevExpress package source @@ -41,7 +41,7 @@ jobs: # Upload docs site: https://github.com/marketplace/actions/upload-a-build-artifact - name: Upload Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: docs-site path: docs/_site @@ -52,11 +52,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 # Download Artifacts: https://github.com/actions/download-artifact - name: Download Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 with: name: docs-site path: docs/_site diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 743141d..b04f73c 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -102,6 +102,9 @@ "allOf": [ { "properties": { + "ArtifactPath": { + "type": "string" + }, "Configuration": { "type": "string", "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", @@ -119,9 +122,6 @@ "DocsOutput": { "type": "string" }, - "Output": { - "type": "string" - }, "PublishOutput": { "type": "string" }, diff --git a/.nuke/parameters.json b/.nuke/parameters.json index 2597e67..37d8598 100644 --- a/.nuke/parameters.json +++ b/.nuke/parameters.json @@ -1,4 +1,4 @@ { "$schema": "./build.schema.json", - "Solution": "dosymep.SimpleServices.sln" + "Solution": "dosymep.SimpleServices.slnx" } \ No newline at end of file diff --git a/src/Directory.Build.props b/Directory.Build.props similarity index 57% rename from src/Directory.Build.props rename to Directory.Build.props index 36e6f7c..dbff088 100644 --- a/src/Directory.Build.props +++ b/Directory.Build.props @@ -1,9 +1,20 @@ - + + + true + enable + latest + enable + + + + net48 + + dosymep dosymep Git - Copyright © 2023 dosymep + Copyright © 2026 dosymep 1.0.0 1.0.0 @@ -12,4 +23,4 @@ https://github.com/dosymep/dosymep.SimpleServices.git https://github.com/dosymep/dosymep.SimpleServices - + \ No newline at end of file diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000..4de98b5 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..d95defe --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,36 @@ + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 808fb3c..aae8e0d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Biseuv Olzhas (dosymep) +Copyright (c) 2026 Biseuv Olzhas (dosymep) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build/Build.cs b/build/Build.cs index 8ab07f9..7075baa 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,51 +1,44 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; using Nuke.Common; -using Nuke.Common.CI; -using Nuke.Common.Execution; using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; -using Nuke.Common.Tools.DocFX; using Nuke.Common.Tools.DotNet; -using Nuke.Common.Tools.GitVersion; -using Nuke.Common.Utilities.Collections; -using Nuke.Components; -using static Nuke.Common.EnvironmentInfo; -using static Nuke.Common.IO.FileSystemTasks; -using static Nuke.Common.IO.PathConstruction; using static Nuke.Common.Tools.DotNet.DotNetTasks; -using static Nuke.Common.Tools.DocFX.DocFXTasks; -class Build : NukeBuild, IHazSolution { +class Build : NukeBuild { /// Support plugins are available for: /// - JetBrains ReSharper https://nuke.build/resharper /// - JetBrains Rider https://nuke.build/rider /// - Microsoft VisualStudio https://nuke.build/visualstudio /// - Microsoft VSCode https://nuke.build/vscode - public static int Main() => Execute(x => x.Compile); + public static int Main() => Execute(x => x.DocsCompile); + + [Solution] public readonly Solution Solution; [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; - [Parameter] readonly AbsolutePath Output = RootDirectory / "bin"; + [Parameter] readonly AbsolutePath ArtifactPath; + [Parameter] readonly AbsolutePath PublishOutput; [Parameter] readonly string DocsOutput = Path.Combine("docs", "_site"); [Parameter] readonly string DocsConfig = Path.Combine("docs", "docfx.json"); [Parameter] readonly AbsolutePath DocsCaches = RootDirectory / Path.Combine("docs", "api"); - [Parameter] readonly AbsolutePath PublishOutput; public Build() { + ArtifactPath = RootDirectory / "bin"; + AbsolutePath appdataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); PublishOutput = appdataFolder / "pyRevit" / "Extensions" / "BIM4Everyone.lib" / "dosymep_libs" / "libs"; } Target Clean => _ => _ .Executes(() => { - Output.CreateOrCleanDirectory(); + ArtifactPath.CreateOrCleanDirectory(); (RootDirectory / DocsOutput).CreateOrCleanDirectory(); DocsCaches.GlobFiles("**/*.yml").DeleteFiles(); RootDirectory.GlobDirectories("**/bin", "**/obj") @@ -57,33 +50,38 @@ public Build() { Target Restore => _ => _ .DependsOn(Clean) .Executes(() => { - DotNetRestore(s => s - .SetProjectFile(((IHazSolution) this).Solution)); + DotNetRestore(s => s.SetProjectFile(Solution)); }); Target Compile => _ => _ .DependsOn(Restore) .Executes(() => { + Project[] frameworkLibs = GetFrameworkLibs(); + DotNetBuild(s => s .EnableForce() .DisableNoRestore() .SetConfiguration(Configuration) - .SetProjectFile(((IHazSolution) this).Solution) - .When(settings => IsServerBuild, - _ => _ - .EnableContinuousIntegrationBuild()) - .SetProperty("OutputPath", Output)); + .CombineWith(frameworkLibs, + (s, frameworkLib) => s + .SetProjectFile(frameworkLib) + .SetProperty("OutputPath", ArtifactPath))); + }); Target Publish => _ => _ - .DependsOn(Restore) - .OnlyWhenStatic(() => IsLocalBuild) + .DependsOn(Compile) .Executes(() => { + Project[] frameworkLibs = GetFrameworkLibs(); + DotNetPublish(s => s .EnableForce() .DisableNoRestore() .SetConfiguration(Configuration) - .SetProperty("PublishDir", PublishOutput)); + .CombineWith(frameworkLibs, + (s, frameworkLib) => s + .SetProject(frameworkLib) + .SetProperty("PublishDir", PublishOutput))); }); Target DocsCompile => _ => _ @@ -104,4 +102,11 @@ public Build() { // .SetProcessWorkingDirectory(RootDirectory) // ); }); + + Project[] GetFrameworkLibs() { + Project[] frameworkLibs = Solution.AllProjects + .Where(item => item.Parent?.ToString()?.Equals("src") == true) + .ToArray(); + return frameworkLibs; + } } \ No newline at end of file diff --git a/build/_build.csproj b/build/_build.csproj index 661bcd9..870cc6d 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 CS0649;CS0169 .. @@ -11,8 +11,8 @@ - - + + diff --git a/docs/docfx.json b/docs/docfx.json index 93c3a8c..1308e11 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -31,7 +31,7 @@ { "_appName" : "dosymep.SimpleServices", "_appTitle" : "dosymep.SimpleServices", - "_appFooter" : "Copyright © 2023 dosymep", + "_appFooter" : "Copyright © 2026 dosymep", "_enableSearch": true, "_disableContribution": true }, diff --git a/dosymep.SimpleServices.sln b/dosymep.SimpleServices.sln deleted file mode 100644 index a77cf22..0000000 --- a/dosymep.SimpleServices.sln +++ /dev/null @@ -1,117 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35707.178 d17.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E6B3F10-C94B-4FBC-AC7E-DE2BE1196531}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - CONTRIBUTING.md = CONTRIBUTING.md - CREDITS.md = CREDITS.md - LICENSE.md = LICENSE.md - README.md = README.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6818E761-7593-48A3-B359-DE5DED96C2AD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{6A2EC13C-F7E2-4AA7-A2F4-836D9A430230}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{CBC741BD-9A25-4096-AD32-2FF1BEA9B504}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dosymep.SimpleServices", "src\dosymep.SimpleServices\dosymep.SimpleServices.csproj", "{FEA822F8-6E69-4BC1-8366-2EEAF94B092C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.WpfCore", "src\dosymep.WpfCore\dosymep.WpfCore.csproj", "{7ACB8D10-9B80-40FA-BBF0-53D3429D6A62}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.WpfCore.Ninject", "src\dosymep.WpfCore.Ninject\dosymep.WpfCore.Ninject.csproj", "{E7DA1D93-4785-42F2-9BA5-D4B78E345ED6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.WpfUI.Core", "src\dosymep.WpfUI.Core\dosymep.WpfUI.Core.csproj", "{657DB082-D554-4D31-8848-86A108DCD0F4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.WpfUI.Core.Ninject", "src\dosymep.WpfUI.Core.Ninject\dosymep.WpfUI.Core.Ninject.csproj", "{41C385FE-AC37-42CD-8939-A0B25C07B825}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.Xpf.Core", "src\dosymep.Xpf.Core\dosymep.Xpf.Core.csproj", "{05FD14D1-F6C7-4D93-83E9-8F6A4E5535F3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.Xpf.Core.Ninject", "src\dosymep.Xpf.Core.Ninject\dosymep.Xpf.Core.Ninject.csproj", "{B8C5A9AE-F0F8-4914-8587-5AF42EE53C97}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDemoLib", "samples\WpfDemoLib\WpfDemoLib.csproj", "{E3FB0B99-C266-4645-8FFB-2C6AA4431D23}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfUIDemoApp", "samples\WpfUIDemoApp\WpfUIDemoApp.csproj", "{E28CC1B6-3299-498F-82AC-48EA1C344C48}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XpfDemoApp", "samples\XpfDemoApp\XpfDemoApp.csproj", "{144670CB-6396-488C-A76D-2E03A3B69E78}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dosymep.WpfCore.Tests", "tests\dosymep.WpfCore.Tests\dosymep.WpfCore.Tests.csproj", "{626B1778-A0B6-4A02-8DB3-A8CC9DE4AF75}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CBC741BD-9A25-4096-AD32-2FF1BEA9B504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CBC741BD-9A25-4096-AD32-2FF1BEA9B504}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FEA822F8-6E69-4BC1-8366-2EEAF94B092C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FEA822F8-6E69-4BC1-8366-2EEAF94B092C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FEA822F8-6E69-4BC1-8366-2EEAF94B092C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FEA822F8-6E69-4BC1-8366-2EEAF94B092C}.Release|Any CPU.Build.0 = Release|Any CPU - {7ACB8D10-9B80-40FA-BBF0-53D3429D6A62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7ACB8D10-9B80-40FA-BBF0-53D3429D6A62}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7ACB8D10-9B80-40FA-BBF0-53D3429D6A62}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7ACB8D10-9B80-40FA-BBF0-53D3429D6A62}.Release|Any CPU.Build.0 = Release|Any CPU - {E7DA1D93-4785-42F2-9BA5-D4B78E345ED6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E7DA1D93-4785-42F2-9BA5-D4B78E345ED6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E7DA1D93-4785-42F2-9BA5-D4B78E345ED6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E7DA1D93-4785-42F2-9BA5-D4B78E345ED6}.Release|Any CPU.Build.0 = Release|Any CPU - {657DB082-D554-4D31-8848-86A108DCD0F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {657DB082-D554-4D31-8848-86A108DCD0F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {657DB082-D554-4D31-8848-86A108DCD0F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {657DB082-D554-4D31-8848-86A108DCD0F4}.Release|Any CPU.Build.0 = Release|Any CPU - {41C385FE-AC37-42CD-8939-A0B25C07B825}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {41C385FE-AC37-42CD-8939-A0B25C07B825}.Debug|Any CPU.Build.0 = Debug|Any CPU - {41C385FE-AC37-42CD-8939-A0B25C07B825}.Release|Any CPU.ActiveCfg = Release|Any CPU - {41C385FE-AC37-42CD-8939-A0B25C07B825}.Release|Any CPU.Build.0 = Release|Any CPU - {05FD14D1-F6C7-4D93-83E9-8F6A4E5535F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05FD14D1-F6C7-4D93-83E9-8F6A4E5535F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05FD14D1-F6C7-4D93-83E9-8F6A4E5535F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05FD14D1-F6C7-4D93-83E9-8F6A4E5535F3}.Release|Any CPU.Build.0 = Release|Any CPU - {B8C5A9AE-F0F8-4914-8587-5AF42EE53C97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B8C5A9AE-F0F8-4914-8587-5AF42EE53C97}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B8C5A9AE-F0F8-4914-8587-5AF42EE53C97}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B8C5A9AE-F0F8-4914-8587-5AF42EE53C97}.Release|Any CPU.Build.0 = Release|Any CPU - {E28CC1B6-3299-498F-82AC-48EA1C344C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E28CC1B6-3299-498F-82AC-48EA1C344C48}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E28CC1B6-3299-498F-82AC-48EA1C344C48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E28CC1B6-3299-498F-82AC-48EA1C344C48}.Release|Any CPU.Build.0 = Release|Any CPU - {E3FB0B99-C266-4645-8FFB-2C6AA4431D23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E3FB0B99-C266-4645-8FFB-2C6AA4431D23}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E3FB0B99-C266-4645-8FFB-2C6AA4431D23}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E3FB0B99-C266-4645-8FFB-2C6AA4431D23}.Release|Any CPU.Build.0 = Release|Any CPU - {144670CB-6396-488C-A76D-2E03A3B69E78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {144670CB-6396-488C-A76D-2E03A3B69E78}.Debug|Any CPU.Build.0 = Debug|Any CPU - {144670CB-6396-488C-A76D-2E03A3B69E78}.Release|Any CPU.ActiveCfg = Release|Any CPU - {144670CB-6396-488C-A76D-2E03A3B69E78}.Release|Any CPU.Build.0 = Release|Any CPU - {626B1778-A0B6-4A02-8DB3-A8CC9DE4AF75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {626B1778-A0B6-4A02-8DB3-A8CC9DE4AF75}.Debug|Any CPU.Build.0 = Debug|Any CPU - {626B1778-A0B6-4A02-8DB3-A8CC9DE4AF75}.Release|Any CPU.ActiveCfg = Release|Any CPU - {626B1778-A0B6-4A02-8DB3-A8CC9DE4AF75}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {FEA822F8-6E69-4BC1-8366-2EEAF94B092C} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {7ACB8D10-9B80-40FA-BBF0-53D3429D6A62} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {E7DA1D93-4785-42F2-9BA5-D4B78E345ED6} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {657DB082-D554-4D31-8848-86A108DCD0F4} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {41C385FE-AC37-42CD-8939-A0B25C07B825} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {05FD14D1-F6C7-4D93-83E9-8F6A4E5535F3} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {B8C5A9AE-F0F8-4914-8587-5AF42EE53C97} = {E2F0449E-146C-4D5F-A6D5-4DDCD49D3C0D} - {E28CC1B6-3299-498F-82AC-48EA1C344C48} = {6A2EC13C-F7E2-4AA7-A2F4-836D9A430230} - {E3FB0B99-C266-4645-8FFB-2C6AA4431D23} = {6A2EC13C-F7E2-4AA7-A2F4-836D9A430230} - {144670CB-6396-488C-A76D-2E03A3B69E78} = {6A2EC13C-F7E2-4AA7-A2F4-836D9A430230} - {626B1778-A0B6-4A02-8DB3-A8CC9DE4AF75} = {6818E761-7593-48A3-B359-DE5DED96C2AD} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {216183AF-6C0C-436A-9020-D4BCCB700FA4} - EndGlobalSection -EndGlobal diff --git a/dosymep.SimpleServices.slnx b/dosymep.SimpleServices.slnx new file mode 100644 index 0000000..00de97d --- /dev/null +++ b/dosymep.SimpleServices.slnx @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/WpfDemoLib/WpfDemoLib.csproj b/samples/WpfDemoLib/WpfDemoLib.csproj index 3a53a62..2126714 100644 --- a/samples/WpfDemoLib/WpfDemoLib.csproj +++ b/samples/WpfDemoLib/WpfDemoLib.csproj @@ -1,25 +1,12 @@  - - - true - net48 - enable - enable - 12 - - - - - - - + - - + - + + diff --git a/samples/WpfUIDemoApp/Program.cs b/samples/WpfUIDemoApp/Program.cs deleted file mode 100644 index 2a7dc18..0000000 --- a/samples/WpfUIDemoApp/Program.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Globalization; -using System.Windows; - -using dosymep.SimpleServices; -using dosymep.WpfCore.Ninject; -using dosymep.WpfUI.Core.Ninject; - -using Ninject; - -using Wpf.Ui.Abstractions; - -using WpfDemoLib.Factories; -using WpfDemoLib.Services; -using WpfDemoLib.ViewModels; - -using WpfUIDemoApp.Factories; -using WpfUIDemoApp.Views; - -namespace WpfUIDemoApp; - -public class Program : Application { - public const string LocalizationResourceName = - "/WpfUIDemoApp;component/assets/localizations/language.xaml"; - public const string NotificationIconResourceName = - "pack://application:,,,/WpfUIDemoApp;component/assets/images/icons8-notification-32.png"; - public const string NotificationWarningIconResourceName = - "pack://application:,,,/WpfUIDemoApp;component/assets/images/icons8-notification-warning-32.png"; - private static IKernel? _kernel; - - [STAThread] - public static void Main() { - Program app = new(); - - _kernel = new StandardKernel(); - - _kernel.Bind().To(); - - _kernel.UseWpfDispatcher(); - - _kernel.UseWpfWindowsLanguage(); - _kernel.UseWpfLocalization(LocalizationResourceName, CultureInfo.GetCultureInfo("ru-RU")); - - _kernel.UseWpfWindowsTheme(); - _kernel.UseWpfUIThemeUpdater(); - - ILocalizationService localizationService = _kernel.Get(); - - _kernel.UseWpfUIMessageBox(); - - _kernel.UseWpfUIProgressDialog( - displayTitleFormat: localizationService.GetLocalizedString("ProgressDialog.Content")); - - _kernel.Bind().To(); - _kernel.Bind() - .ToMethod(c => new SecondViewFactory(() => c.Kernel.Get())); - - _kernel.Bind() - .To(); - - _kernel.Bind().ToSelf(); - _kernel.Bind().ToSelf(); - - _kernel.BindMainWindow(); - - - app.Run(_kernel.Get()); - } -} \ No newline at end of file diff --git a/samples/WpfUIDemoApp/WpfUIDemoApp.csproj b/samples/WpfUIDemoApp/WpfUIDemoApp.csproj index 1b30347..3a6ead8 100644 --- a/samples/WpfUIDemoApp/WpfUIDemoApp.csproj +++ b/samples/WpfUIDemoApp/WpfUIDemoApp.csproj @@ -2,48 +2,30 @@ WinExe - net48 - enable - enable - true - 12 - - - - - - - - - - - - - - - - + + + + + + all + runtime + - - MSBuild:Compile - Wpf - Designer - - - MSBuild:Compile - Wpf - Designer - + + + + + diff --git a/samples/XpfDemoApp/XpfDemoApp.csproj b/samples/XpfDemoApp/XpfDemoApp.csproj index a5c2372..dc7976d 100644 --- a/samples/XpfDemoApp/XpfDemoApp.csproj +++ b/samples/XpfDemoApp/XpfDemoApp.csproj @@ -2,56 +2,36 @@ WinExe - net48 - enable - enable - true - 12 - - - - all - runtime - + + + + - - - - - - + - - MSBuild:Compile - Wpf - Designer - - - MSBuild:Compile - Wpf - Designer - - - MSBuild:Compile - Wpf - Designer - + + + + + all + runtime + - - - - - - + + + + + + - + \ No newline at end of file diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index b4da301..0000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/dosymep.SimpleServices/dosymep.SimpleServices.csproj b/src/dosymep.SimpleServices/dosymep.SimpleServices.csproj index ddc0830..4eb2a04 100644 --- a/src/dosymep.SimpleServices/dosymep.SimpleServices.csproj +++ b/src/dosymep.SimpleServices/dosymep.SimpleServices.csproj @@ -1,9 +1,7 @@ + - true - net48 true - true @@ -13,18 +11,13 @@ - - - - - - - + compile - + compile + diff --git a/src/dosymep.WpfCore.Ninject/dosymep.WpfCore.Ninject.csproj b/src/dosymep.WpfCore.Ninject/dosymep.WpfCore.Ninject.csproj index 85fe002..f41c803 100644 --- a/src/dosymep.WpfCore.Ninject/dosymep.WpfCore.Ninject.csproj +++ b/src/dosymep.WpfCore.Ninject/dosymep.WpfCore.Ninject.csproj @@ -1,11 +1,6 @@  - true - enable - 12 - enable - net48 true @@ -16,17 +11,14 @@ - - - - + all runtime - + diff --git a/src/dosymep.WpfCore/dosymep.WpfCore.csproj b/src/dosymep.WpfCore/dosymep.WpfCore.csproj index 235f060..3c2fb35 100644 --- a/src/dosymep.WpfCore/dosymep.WpfCore.csproj +++ b/src/dosymep.WpfCore/dosymep.WpfCore.csproj @@ -1,11 +1,7 @@  + - true true - enable - 12 - enable - net48 true @@ -16,28 +12,23 @@ - - - - - - - - - - - - - - + - + + all + runtime + + + + all + runtime + - - + + diff --git a/src/dosymep.WpfUI.Core.Ninject/dosymep.WpfUI.Core.Ninject.csproj b/src/dosymep.WpfUI.Core.Ninject/dosymep.WpfUI.Core.Ninject.csproj index 3356554..ce081db 100644 --- a/src/dosymep.WpfUI.Core.Ninject/dosymep.WpfUI.Core.Ninject.csproj +++ b/src/dosymep.WpfUI.Core.Ninject/dosymep.WpfUI.Core.Ninject.csproj @@ -1,11 +1,6 @@  - true - enable - 12 - enable - net48 true @@ -16,15 +11,12 @@ - - - - + all runtime - + all runtime diff --git a/src/dosymep.WpfUI.Core/dosymep.WpfUI.Core.csproj b/src/dosymep.WpfUI.Core/dosymep.WpfUI.Core.csproj index 61ec090..901e919 100644 --- a/src/dosymep.WpfUI.Core/dosymep.WpfUI.Core.csproj +++ b/src/dosymep.WpfUI.Core/dosymep.WpfUI.Core.csproj @@ -1,10 +1,6 @@  + - true - enable - 12 - enable - net48 true @@ -15,40 +11,29 @@ - - C:\Users\biseuv_o\.nuget\packages\microsoft.xaml.behaviors.wpf\1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll - - - - - + + + + + + - + + + all + runtime + + + all runtime + - - - - - - - - - - - - - - - MSBuild:Compile - - - MSBuild:Compile - + + diff --git a/src/dosymep.Xpf.Core.Ninject/dosymep.Xpf.Core.Ninject.csproj b/src/dosymep.Xpf.Core.Ninject/dosymep.Xpf.Core.Ninject.csproj index e606b57..4f51b15 100644 --- a/src/dosymep.Xpf.Core.Ninject/dosymep.Xpf.Core.Ninject.csproj +++ b/src/dosymep.Xpf.Core.Ninject/dosymep.Xpf.Core.Ninject.csproj @@ -1,11 +1,6 @@ - true - enable - 11 - enable - net48 true @@ -16,15 +11,12 @@ - - - - + all runtime - + all runtime diff --git a/src/dosymep.Xpf.Core/dosymep.Xpf.Core.csproj b/src/dosymep.Xpf.Core/dosymep.Xpf.Core.csproj index 8b7a5ae..f60cf07 100644 --- a/src/dosymep.Xpf.Core/dosymep.Xpf.Core.csproj +++ b/src/dosymep.Xpf.Core/dosymep.Xpf.Core.csproj @@ -1,11 +1,9 @@ + - true - net48 true - true - + dosymep.Xpf.Core dosymep.Xpf.Core @@ -13,18 +11,18 @@ - - - - - - + + + + + all runtime - + + diff --git a/tests/dosymep.WpfCore.Tests/dosymep.WpfCore.Tests.csproj b/tests/dosymep.WpfCore.Tests/dosymep.WpfCore.Tests.csproj index 682d824..2db7584 100644 --- a/tests/dosymep.WpfCore.Tests/dosymep.WpfCore.Tests.csproj +++ b/tests/dosymep.WpfCore.Tests/dosymep.WpfCore.Tests.csproj @@ -1,5 +1,5 @@  - + true enable @@ -11,25 +11,25 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - + + - +