Skip to content

Commit 3ec4bab

Browse files
committed
Updated project for multi-targeting
1 parent 3229425 commit 3ec4bab

File tree

4 files changed

+807
-4
lines changed

4 files changed

+807
-4
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/unknown6656.WPFPixelShaderLibrary)
44
| [NuGet Package](https://www.nuget.org/packages/unknown6656.WPFPixelShaderLibrary/)
55

6+
Requires .NET Framework v.4.6 (or higher) or .NET Core 3.0 (or higher).
7+
8+
#### Usage
69
Just add `xmlns:fx="https://unknown6656.com/wpfpslib"` to your XAML namespace definitions to use the effects:
710
```xml
811
<Window x:Class="MyTestApp.MainWindow"

wpfpslib/ShaderEffectBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ where t.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)
120120
private static Uri GetUri(string name) => new Uri($"pack://application:,,,/{asmname};component/ps-compiled/{name}.ps");
121121

122122
private static string? TrimEnd(string? input, string? suffix, StringComparison cmp = StringComparison.InvariantCulture) =>
123-
suffix is string s && (input?.EndsWith(s, cmp) ?? false) ? input[..^s.Length] : input;
123+
suffix is string s && (input?.EndsWith(s, cmp) ?? false) ? input.Remove(input.Length - s.Length) : input;
124124

125125
/// <summary>
126126
/// Registers a new Dependency Property bound to a given .NET Property and a HLSL Pixel Shader register

wpfpslib/wpfpslib.csproj

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
22
<PropertyGroup>
33
<OutputType>Library</OutputType>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<DocumentationFile>wpfpslib.xml</DocumentationFile>
5+
<TargetFrameworks>netcoreapp3.0;net46</TargetFrameworks>
56
<RootNamespace>WPFTestApplication</RootNamespace>
67
<UseWPF>true</UseWPF>
78
<Nullable>enable</Nullable>
89
<LangVersion>latest</LangVersion>
910
<XamlDebuggingInformation>True</XamlDebuggingInformation>
10-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
11+
<!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
1112
<RunPostBuildEvent>Always</RunPostBuildEvent>
1213
<PackageId>unknown6656.WPFPixelShaderLibrary</PackageId>
1314
<Authors>unknown6656</Authors>
@@ -23,6 +24,8 @@ Just add `xmlns:fx="https://unknown6656.com/wpfpslib"` to your XAML namespace de
2324
<PackageTags>unknown6656;pixel;shader;effect;library;wpf;xaml;windows;blur;distortion;ps;dgsl;hlsl;fx;pscompiler;fxc</PackageTags>
2425
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2526
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
27+
<Version>1.0.2</Version>
28+
<AssemblyVersion>1.0.2.0</AssemblyVersion>
2629
</PropertyGroup>
2730
<ItemGroup>
2831
<Folder Include="ps-dgsl/" />
@@ -37,7 +40,9 @@ Just add `xmlns:fx="https://unknown6656.com/wpfpslib"` to your XAML namespace de
3740
</None>
3841
<Resource Include="ps-compiled/*.ps" />
3942
<None Remove="ps-hlsl\BlurBehind.fx" />
40-
<ProjectReference Include="../pscompiler/pscompiler.csproj" />
43+
</ItemGroup>
44+
<ItemGroup>
45+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
4146
</ItemGroup>
4247
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
4348
<Exec Command="dotnet $(SolutionDir)tools/pscompiler.dll ps-hlsl ps-compiled" />

0 commit comments

Comments
 (0)