Skip to content

Updates to support .NET 8.0 #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: .NET

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0

- name: Install .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore ./Source/SVGImage/DotNetProjects.SVGImage.csproj

- name: GitVersion
id: gitversion # step id used as reference for output values
uses: roryprimrose/set-vs-sdk-project-version@v1.0.6
with:
projectFilter: './Source/SVGImage/*.SVGImage.csproj'
version:
description: 'Maps to the Version element'
required: false
assemblyVersion:
description: 'Maps to the AssemblyVersion element'
required: false
fileVersion:
description: 'Maps to the FileVersion element'
required: false
informationalVersion:
description: 'Maps to the InformationalVersion element'
required: false

- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1.0.6
with:
projectFilter: './Source/SVGImage/*.SVGImage.csproj'
version: ${{ steps.gitversion.outputs.NuGetVersionV2 }}
assemblyVersion: ${{ steps.gitversion.outputs.AssemblySemVer }}
fileVersion: ${{ steps.gitversion.outputs.MajorMinorPatch }}
informationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }}

- name: Build, Test, Pack, Publish
shell: bash
run: |
dotnet tool install -g dotnet-releaser
dotnet-releaser run --nuget-token "${{secrets.NUGET_API_KEY}}" --github-token "${{secrets.GITHUB_TOKEN}}" Source/dotnet-releaser.toml
41 changes: 27 additions & 14 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
# Your GitHub workflow file under .github/workflows/
name: DocFX

# Trigger the action on push to master
on:
push:
branches:
- master


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dotnet Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
dotnet-version: 8.x

- run: dotnet tool update -g docfx
- run: docfx Docs/docfx.json

- name: Upload DocFX packages
uses: actions/upload-artifact@v3
with:
name: docfx_site
path: ${{ github.workspace }}/Docs/_site

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: Docs/_site
# Upload entire repository
path: 'Docs/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion Docs/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The SVGImage control library targets the following frameworks
* .NET Framework, Version 4.7
* .NET Framework, Version 4.8
* .NET Core, Version 3.1
* .NET 6 ~ 7
* .NET 6 ~ 8

## License
The SVGImage control library is relicensed under [MIT License](https://github.com/dotnetprojects/SVGImage/blob/master/LICENSE),
Expand Down
6 changes: 4 additions & 2 deletions Docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"src": "../Source/",
"properties": {
"TargetFramework": "netcoreapp3.1"
"TargetFramework": "net8.0"
}
}
],
Expand Down Expand Up @@ -55,6 +55,8 @@
"_appFaviconPath": "images/dotnetprojects.png",
"_enableDiagrams": true,
"_enableSearch": true,
"pdf": true,
"pdfTocPage": true,
"_appFooter": "<div class=\"d-flex flex-column flex-sm-row justify-content-between pt-1\"><p> &copy; 2020 - 2023 DotNetProjects</p><p>Made with <a href=\"https://dotnet.github.io/docfx\">DocFX</a></p></div>",
"_gitContribute": {
"repo": "https://github.com/dotnetprojects/SVGImage",
Expand All @@ -74,4 +76,4 @@
"keepFileLink": false,
"disableGitFeatures": false
}
}
}
25 changes: 23 additions & 2 deletions Docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## SVGImage
# SVGImage
This is an SVG Image View Control for WPF applications.

Initially forked from: [SVGImage Control - CodeProject Article](https://www.codeproject.com/Articles/92434/SVGImage-Control)
Expand All @@ -8,6 +8,27 @@ Besides the bug fixes, new features are added including the following:
- Support of styles.
- Simple Animation support.

## Downloads
The SVGImage is available as a single DLL in [NuGet Package](https://www.nuget.org/packages/DotNetProjects.SVGImage).
The respository includes
* **Tests:** For test tools, and
* **Samples:** For sample applications
* **Docs:** For the documentations (in markdown format).

The command lines installation options are: For the version `5.0.118`
* **.NET CLI:** dotnet add package DotNetProjects.SVGImage --version 5.0.118
* **Package Manager:** NuGet\Install-Package DotNetProjects.SVGImage -Version 5.0.118

For reference in projects use: For the version `5.0.118`
```xml
<PackageReference Include="DotNetProjects.SVGImage" Version="5.0.118" />
```

## How to build
The SVGImage build targets .NET6.0-Windows (and up), .Net Framework 4.x TFMs and .NET Core 3.1.
* Use `Source/SVGImage.sln` in requires Visual Studio 2022 for complete build, or
* Use `Source/SVGImage.VS2019.sln` in Visual Studio 2019 for .Net Frameworks and .NET Core 3.1.

## Framework support
The SVGImage control library targets the following frameworks
* .NET Framework, Version 4.0
Expand All @@ -16,7 +37,7 @@ The SVGImage control library targets the following frameworks
* .NET Framework, Version 4.7
* .NET Framework, Version 4.8
* .NET Core, Version 3.1
* .NET 6 ~ 7
* .NET 6 ~ 8

## License
The SVGImage control library is relicensed under [MIT License](https://github.com/dotnetprojects/SVGImage/blob/master/LICENSE),
Expand Down
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## SVGImage
# SVGImage
This is an SVG Image View Control for WPF applications.

Initially forked from: [SVGImage Control - CodeProject Article](https://www.codeproject.com/Articles/92434/SVGImage-Control)
Expand All @@ -8,6 +8,27 @@ Besides the bug fixes, new features are added including the following:
- Support of styles.
- Simple Animation support.

## Downloads
The SVGImage is available as a single DLL in [NuGet Package](https://www.nuget.org/packages/DotNetProjects.SVGImage).
The respository includes
* **Tests:** For test tools, and
* **Samples:** For sample applications
* **Docs:** For the documentations (in markdown format).

The command lines installation options are: For the version `5.0.118`
* **.NET CLI:** dotnet add package DotNetProjects.SVGImage --version 5.0.118
* **Package Manager:** NuGet\Install-Package DotNetProjects.SVGImage -Version 5.0.118

For reference in projects use: For the version `5.0.118`
```xml
<PackageReference Include="DotNetProjects.SVGImage" Version="5.0.118" />
```

## How to build
The SVGImage build targets .NET6.0-Windows (and up), .Net Framework 4.x TFMs and .NET Core 3.1.
* Use `Source/SVGImage.sln` in requires Visual Studio 2022 for complete build, or
* Use `Source/SVGImage.VS2019.sln` in Visual Studio 2019 for .Net Frameworks and .NET Core 3.1.

## Documentations
For the User Manual and API References see [Documentation](http://dotnetprojects.github.io/SVGImage/).

Expand All @@ -19,7 +40,7 @@ The SVGImage control library targets the following frameworks
* .NET Framework, Version 4.7
* .NET Framework, Version 4.8
* .NET Core, Version 3.1
* .NET 6 ~ 7
* .NET 6 ~ 8

## License
The SVGImage control library is relicensed under [MIT License](https://github.com/dotnetprojects/SVGImage/blob/master/LICENSE),
Expand All @@ -28,3 +49,5 @@ with permission from the original author.
## Sample Application

![](Docs/images/sample.png)


14 changes: 13 additions & 1 deletion Samples/ClipArtViewer/ClipArtViewer.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net40;net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net40;net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -17,11 +17,15 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<OutputPath>Output\</OutputPath>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<OutputPath>Output\</OutputPath>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>ClipArtViewer.ico</ApplicationIcon>
Expand Down Expand Up @@ -114,4 +118,12 @@
<HintPath>..\..\Tests\Libs\net7.0-windows\Notifications.Wpf.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0-windows'">
<Reference Include="ShellFileDialogs">
<HintPath>..\..\Tests\Libs\net8.0\ShellFileDialogs.dll</HintPath>
</Reference>
<Reference Include="Notifications.Wpf">
<HintPath>..\..\Tests\Libs\net8.0-windows\Notifications.Wpf.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion Samples/CustomBrushesExample/CustomBrushesExample.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net40;net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net40;net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -13,10 +13,14 @@
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>CustomBrushesExample.ico</ApplicationIcon>
Expand Down
7 changes: 6 additions & 1 deletion Samples/Example/Example.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net40;net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net40;net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -13,10 +13,14 @@
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Example.ico</ApplicationIcon>
Expand All @@ -30,6 +34,7 @@
<DefineConstants Condition="$(TargetFramework.StartsWith('netcore'))">$(DefineConstants);NETCORE</DefineConstants>
<DefineConstants Condition="$(TargetFramework.StartsWith('net6'))">$(DefineConstants);NETCORE;NETNEXT</DefineConstants>
<DefineConstants Condition="$(TargetFramework.StartsWith('net7'))">$(DefineConstants);NETCORE;NETNEXT</DefineConstants>
<DefineConstants Condition="$(TargetFramework.StartsWith('net8'))">$(DefineConstants);NETCORE;NETNEXT</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Remove="Images\rect.svg" />
Expand Down
7 changes: 6 additions & 1 deletion Samples/IconConverterSample/IconConverterSample.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net45;net46;net47;net48;netcoreapp3.1;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
Expand All @@ -23,16 +23,21 @@
<DefineConstants Condition="$(TargetFramework.StartsWith('netcore'))">$(DefineConstants);NETCORE</DefineConstants>
<DefineConstants Condition="$(TargetFramework.StartsWith('net6'))">$(DefineConstants);NETCORE;NETNEXT</DefineConstants>
<DefineConstants Condition="$(TargetFramework.StartsWith('net7'))">$(DefineConstants);NETCORE;NETNEXT</DefineConstants>
<DefineConstants Condition="$(TargetFramework.StartsWith('net8'))">$(DefineConstants);NETCORE;NETNEXT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<OutputPath>Output\</OutputPath>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE</DefineConstants>
<OutputPath>Output\</OutputPath>
<!-- NOTE: The target framework 'netcoreapp3.1' is out of support -->
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Source\SVGImage\DotNetProjects.SVGImage.csproj" />
Expand Down
Loading