Skip to content

Commit 5571c20

Browse files
Update for latest versions
1 parent 0700d5f commit 5571c20

File tree

7 files changed

+60
-7
lines changed

7 files changed

+60
-7
lines changed

articles/imagesharp.web/index.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,26 @@ paket add SixLabors.ImageSharp.Web --version VERSION_NUMBER
3939
***
4040

4141
>[!WARNING]
42-
>Prerelease versions installed via the [Visual Studio NuGet Package Manager](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio) require the "include prerelease" checkbox to be checked.
42+
>Prerelease versions installed via the [Visual Studio NuGet Package Manager](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio) require the "include prerelease" checkbox to be checked.
43+
44+
### Implicit Usings
45+
46+
The `UseImageSharp` property controls whether **implicit `global using` directives** for ImageSharp are included in your C# project. This feature is available in projects targeting **.NET 6 or later** with **C# 10 or later**.
47+
48+
When enabled, a predefined set of `global using` directives for common ImageSharp namespaces (such as `SixLabors.ImageSharp`, `SixLabors.ImageSharp.Processing`, `SixLabors.ImageSharp.Web` etc.) is automatically added to the compilation. This eliminates the need to manually add `using` statements in every file.
49+
50+
To enable implicit ImageSharp usings, set the property in your project file:
51+
52+
```xml
53+
<PropertyGroup>
54+
<UseImageSharp>true</UseImageSharp>
55+
</PropertyGroup>
56+
```
57+
58+
To disable the feature, either remove the property or set it to `false`:
59+
60+
```xml
61+
<PropertyGroup>
62+
<UseImageSharp>false</UseImageSharp>
63+
</PropertyGroup>
64+
```

articles/imagesharp.web/processingcommands.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,13 @@ ImageSharp.Web v3.0.0 comes equipped with a custom tag helper that allows the ge
141141
>[!NOTE]
142142
>Using @SixLabors.ImageSharp.Web.TagHelpers.ImageTagHelper is the recommended way to generate processing commands.
143143
144-
To use @SixLabors.ImageSharp.Web.TagHelpers.ImageTagHelper, add the following imports command to `_ViewImports.cshtml` in your project.
144+
To use @SixLabors.ImageSharp.Web.TagHelpers.ImageTagHelper, add the following `using` and `addTagHelper` commands to `_ViewImports.cshtml` in your project.
145145

146146
```html
147+
@using SixLabors.ImageSharp
148+
@using SixLabors.ImageSharp.Processing
149+
@using SixLabors.ImageSharp.Web
150+
147151
@addTagHelper *, SixLabors.ImageSharp.Web
148152
```
149153

articles/imagesharp/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,26 @@ paket add SixLabors.ImageSharp --version VERSION_NUMBER
4343

4444
>[!WARNING]
4545
>Prerelease versions installed via the [Visual Studio NuGet Package Manager](https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio) require the "include prerelease" checkbox to be checked.
46+
47+
### Implicit Usings
48+
49+
The `UseImageSharp` property controls whether **implicit `global using` directives** for ImageSharp are included in your C# project. This feature is available in projects targeting **.NET 6 or later** with **C# 10 or later**.
50+
51+
When enabled, a predefined set of `global using` directives for common ImageSharp namespaces (such as `SixLabors.ImageSharp`, `SixLabors.ImageSharp.Processing`, etc.) is automatically added to the compilation. This eliminates the need to manually add `using` statements in every file.
52+
53+
To enable implicit ImageSharp usings, set the property in your project file:
54+
55+
```xml
56+
<PropertyGroup>
57+
<UseImageSharp>true</UseImageSharp>
58+
</PropertyGroup>
59+
```
60+
61+
To disable the feature, either remove the property or set it to `false`:
62+
63+
```xml
64+
<PropertyGroup>
65+
<UseImageSharp>false</UseImageSharp>
66+
</PropertyGroup>
67+
```
68+

build.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ Get-ChildItem ./ext -Directory | ForEach-Object {
1010
# Fetch tags and check out the latest tag
1111
git -C "$path" fetch --tags
1212

13-
# Get all tags, sort them alphabetically, and select the highest one
14-
$highestTag = (git -C "$path" tag | Sort-Object -Descending)[0] | Out-String
13+
# Get all tags, sort them by semantic version, and select the highest one
14+
$highestTag = git -C "$path" tag |
15+
Where-Object { $_ -match '^v\d+\.\d+\.\d+$' } |
16+
Sort-Object { [Version]($_ -replace '^v', '') } -Descending |
17+
Select-Object -First 1
18+
1519
$highestTag = $highestTag.Trim()
1620
Write-Host "$path => $highestTag"
1721

ext/ImageSharp

Submodule ImageSharp updated 34 files

ext/ImageSharp.Web

Submodule ImageSharp.Web updated 30 files

0 commit comments

Comments
 (0)