null54 Posted September 22, 2021 Share Posted September 22, 2021 I encountered a MSBuild warning when updating a few of my FileType plugins for Paint.NET 4.3. Warning MSB3277 Found conflicts between different versions of "WindowsBase" that could not be resolved. There was a conflict between "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "WindowsBase, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "WindowsBase, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not. References which depend on "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll]. C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll Project file item includes which caused reference "C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll". C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll References which depend on "WindowsBase, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" []. D:\Program Files\paint.net\PaintDotNet.Base.dll Project file item includes which caused reference "D:\Program Files\paint.net\PaintDotNet.Base.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data D:\Program Files\paint.net\PaintDotNet.Core.dll Project file item includes which caused reference "D:\Program Files\paint.net\PaintDotNet.Core.dll". PaintDotNet.Core PaintDotNet.Data D:\Program Files\paint.net\PaintDotNet.SystemLayer.dll Project file item includes which caused reference "D:\Program Files\paint.net\PaintDotNet.SystemLayer.dll". PaintDotNet.Core PaintDotNet.Data D:\Program Files\paint.net\PaintDotNet.Framework.dll Project file item includes which caused reference "D:\Program Files\paint.net\PaintDotNet.Framework.dll". PaintDotNet.Data D:\Program Files\paint.net\PaintDotNet.SystemLayer.Native.x64.dll Project file item includes which caused reference "D:\Program Files\paint.net\PaintDotNet.SystemLayer.Native.x64.dll". PaintDotNet.Core PaintDotNet.Data DdsFileTypePlus C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2203 Has anyone else had this issue? Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 22, 2021 Share Posted September 22, 2021 Yes - I have seen it many times. Close the solution and reload usually works. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 23, 2021 Share Posted September 23, 2021 I saw this a few times but I don't remember what fixed it. Could just be like @AndrewDavid said ... exit VS, delete bin and obj folders, reload and try again. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 23, 2021 Share Posted September 23, 2021 I just saw the error again. I went into Properties\Package and reset my assembly version to 1.0.0.0 It allowed me to build and it changed it back to 1.0.0.1 which was the value that was there before I reset it. Another Microsoft bug. Quote Link to comment Share on other sites More sharing options...
otuncelli Posted September 23, 2021 Share Posted September 23, 2021 @null54 ILSpy shows me that you're using 4.2.16 libraries for references. This is not a good idea. It'll mostly work but things (methods and stuff) you're using may not be available anymore or their behaviour may be different for some reason. I'd suggest referencing PDN 4.3's libraries to minimize the risk. This is WebP plugin. Same for AvifFileType and DDSFileTypePlus. // Detected TargetFramework-Id: .NETCoreApp,Version=v5.0 // Detected RuntimePack: Microsoft.NETCore.App // Referenced assemblies (in metadata order): // PaintDotNet.Base, Version=4.216.7781.39227, Culture=neutral, PublicKeyToken=null // Assembly reference loading information: // There were some problems during assembly reference load, see below for more information! // Error: Could not find reference: PaintDotNet.Base, Version=4.216.7781.39227, Culture=neutral, PublicKeyToken=null // PaintDotNet.Core, Version=4.216.7781.39227, Culture=neutral, PublicKeyToken=null // Assembly reference loading information: // There were some problems during assembly reference load, see below for more information! // Error: Could not find reference: PaintDotNet.Core, Version=4.216.7781.39227, Culture=neutral, PublicKeyToken=null // PaintDotNet.Data, Version=4.216.7781.39227, Culture=neutral, PublicKeyToken=null // Assembly reference loading information: // There were some problems during assembly reference load, see below for more information! // Error: Could not find reference: PaintDotNet.Data, Version=4.216.7781.39227, Culture=neutral, PublicKeyToken=null // System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // System.ComponentModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // System.Drawing.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (unresolved) // System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // System.Runtime.InteropServices.RuntimeInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (unresolved) // WebP_ARM64.dll // contains no metadata // WebP_x64.dll // contains no metadata // WebP_x86.dll // contains no metadata For my plugins, I'm doing it like this in project file. This resolves version conflicts and also helps me to see which things are available (or not) in each version of PDN. Unfortunately I couldn't find an official way to acquire older versions of PDN libraries for backward compatible development purposes. I took a backup before installing 4.3. <ItemGroup Condition="'$(TargetFramework)'=='net47'"> <Reference Include="PaintDotNet.Base"> <HintPath>..\4.2.16 Libs\PaintDotNet.Base.dll</HintPath> </Reference> <Reference Include="PaintDotNet.Core"> <HintPath>..\4.2.16 Libs\PaintDotNet.Core.dll</HintPath> </Reference> <Reference Include="PaintDotNet.Data"> <HintPath>..\4.2.16 Libs\PaintDotNet.Data.dll</HintPath> </Reference> </ItemGroup> <ItemGroup Condition="'$(TargetFramework)'=='net5.0-windows'"> <Reference Include="PaintDotNet.Base"> <HintPath>C:\Program Files\paint.net\PaintDotNet.Base.dll</HintPath> </Reference> <Reference Include="PaintDotNet.Core"> <HintPath>C:\Program Files\paint.net\PaintDotNet.Core.dll</HintPath> </Reference> <Reference Include="PaintDotNet.Data"> <HintPath>C:\Program Files\paint.net\PaintDotNet.Data.dll</HintPath> </Reference> </ItemGroup> Quote Link to comment Share on other sites More sharing options...
null54 Posted September 23, 2021 Author Share Posted September 23, 2021 2 hours ago, otuncelli said: I'd suggest referencing PDN 4.3's libraries to minimize the risk. I received the warning after changing those projects to use the PDN 4.3 libraries. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
midora Posted September 23, 2021 Share Posted September 23, 2021 All my 4.3 plugin variants are showing this warning. I never could eliminate it. But there seems to be no negative effect at runtime. Quote Link to comment Share on other sites More sharing options...
BLUEnLIVE Posted October 8, 2021 Share Posted October 8, 2021 Is there the same problem with VS 2019? Wow... In VS 2019, I didn't see this problem. However, for me, this error occurred after installing VS2022 preview, and the compilation was stopped. Is there a definite solution? Quote Link to comment Share on other sites More sharing options...
midora Posted October 8, 2021 Share Posted October 8, 2021 Please report in case you could solve your issue in VS 2022. I will stay on VS 2019 for a while. I'm just getting the warning which seems to have no effect at runtime. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted April 18, 2022 Share Posted April 18, 2022 @midora Here's a suggested solution to this issue for VS2022. I just rebuilt 3 plugins and found a way to resolve the warning. Add the WindowsBase.dll to your project from the paint.net directory Change the platform target to x64. (WindowsBase does not like the reference to the ARM64 CPU) I was able to build 2 plugins without seeing the error at all. The experts might not like the solution, but it does work. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted April 19, 2022 Share Posted April 19, 2022 40 minutes ago, AndrewDavid said: Change the platform target to x64 and guess what happens when you try to run your plugin on a x86 or an ARM64 system... Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 19, 2022 Share Posted April 19, 2022 Yeah. Don't see the architecture unless you absolutely need to. You'll know if you do, and in this case you don't. And don't add WindowsBase.dll as a reference from the paint.net directory. That's 100% wrong. The solution is to have the right lines (highlighted below) in your csproj at the top, and remove any "references" to WindowsBase, PresentationCore, PresentationFramework, System.Windows.Forms. Those assembly references are handled automatically by the build system now. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
otuncelli Posted April 19, 2022 Share Posted April 19, 2022 I suggest ignore or suppress this warning. If your project doesn't really use WinForms or WPF, don't reference them in your project. You might end up accidentally (thanks to IntelliSense) using types in them and having actual WPF or WinForms dependency. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted April 19, 2022 Share Posted April 19, 2022 2 hours ago, toe_head2001 said: what happens when you try to run your plugin on a x86 or an ARM64 system... Any plugins I build (Except 1) are for personal use. They are all exported from Codelab to VS. Changing those lines in csproj file did not resolve the issue. @Rick Brewster Here's a detailed list of events when trying your suggestion. Each change resulted in another error. Spoiler 1. Error adding "UseWpf" I did keep the other 2 lines. Severity Code Description Project File Line Suppression State Error MSB4030 " true " is an invalid value for the "UseWpf" parameter of the "GenerateSupportedTargetFrameworkAlias" task. The "UseWpf" parameter is of type "System.Boolean". xy2xyzEffect C:\Program Files\dotnet\sdk\6.0.300-preview.22204.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets 1050 2. Error when CPU is changed to Any Severity Code Description Project File Line Suppression State Warning MSB3270 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "WindowsBase", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. xy2xyzEffect C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 2302 After removing WindowsBase from references this CPU error was removed 3. On build Severity Code Description Project File Line Suppression State Warning MSB3277 Found conflicts between different versions of "WindowsBase" that could not be resolved. There was a conflict between "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "WindowsBase, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "WindowsBase, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not. References which depend on "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.3\ref\net6.0\WindowsBase.dll]. C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.3\ref\net6.0\WindowsBase.dll Project file item includes which caused reference "C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.3\ref\net6.0\WindowsBase.dll". C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.3\ref/net6.0/WindowsBase.dll References which depend on "WindowsBase, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" []. C:\Program Files\paint.net\PaintDotNet.Base.dll Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.Base.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PaintDotNet.Core.dll Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.Core.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PaintDotNet.SystemLayer.dll Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.SystemLayer.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PaintDotNet.Framework.dll Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.Framework.dll". PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationCore.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationCore.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\UIAutomationProvider.dll Project file item includes which caused reference "C:\Program Files\paint.net\UIAutomationProvider.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\UIAutomationTypes.dll Project file item includes which caused reference "C:\Program Files\paint.net\UIAutomationTypes.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\ReachFramework.dll Project file item includes which caused reference "C:\Program Files\paint.net\ReachFramework.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\System.Printing.dll Project file item includes which caused reference "C:\Program Files\paint.net\System.Printing.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationUI.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationUI.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PaintDotNet.SystemLayer.Native.x64.dll Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.SystemLayer.Native.x64.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\DirectWriteForwarder.dll Project file item includes which caused reference "C:\Program Files\paint.net\DirectWriteForwarder.dll". PaintDotNet.Base PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.Aero.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.Aero.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.Aero2.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.Aero2.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.AeroLite.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.AeroLite.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.Classic.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.Classic.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.Luna.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.Luna.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\PresentationFramework.Royale.dll Project file item includes which caused reference "C:\Program Files\paint.net\PresentationFramework.Royale.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\System.Windows.Controls.Ribbon.dll Project file item includes which caused reference "C:\Program Files\paint.net\System.Windows.Controls.Ribbon.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\System.Windows.Presentation.dll Project file item includes which caused reference "C:\Program Files\paint.net\System.Windows.Presentation.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\UIAutomationClient.dll Project file item includes which caused reference "C:\Program Files\paint.net\UIAutomationClient.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects C:\Program Files\paint.net\UIAutomationClientSideProviders.dll Project file item includes which caused reference "C:\Program Files\paint.net\UIAutomationClientSideProviders.dll". PaintDotNet.Core PaintDotNet.Data PaintDotNet.Effects xy2xyzEffect C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 2302 4. Adding WindowsBase to references clears the error but creates this conflict Severity Code Description Project File Line Suppression State Warning MSB3270 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "WindowsBase", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. xy2xyzEffect C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 2302 5. Changing platform target to x64 clears this error. I know from previous builds that the error is just a warning and has no effect on the operation of the plugin. I just prefer not to see any warnings or messages when I work in VS. I did notice that your csproj is for an executable and not an assembly. That may be why UseWPF caused an error. The csproj is generated by codelab as well. Hence my solution for plugins that are not distributed (for @toe_head2001's ease of mind) Only through a clear understanding of the problem can we gain a permanent solution. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 19, 2022 Share Posted April 19, 2022 Can you post your csproj here? There's probably something very simple that should or shouldn't be there Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
AndrewDavid Posted April 19, 2022 Share Posted April 19, 2022 (edited) @Rick Brewster I think the issue is within the WindowsBase file itself. Spoiler Taken from C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.3\ref\net6.0WindowsBase.dll [assembly: AssemblyVersion("4.0.0.0")] [assembly: AssemblyFileVersion("6.0.322.12309")] The csproj file is generated by codelab. The codelab code comes from Edited July 8, 2022 by AndrewDavid Removed upload Quote Link to comment Share on other sites More sharing options...
otuncelli Posted April 19, 2022 Share Posted April 19, 2022 4 hours ago, AndrewDavid said: 1. Error adding "UseWpf" I did keep the other 2 lines. Severity Code Description Project File Line Suppression State Error MSB4030 " true " is an invalid value for the "UseWpf" parameter of the "GenerateSupportedTargetFrameworkAlias" task. The "UseWpf" parameter is of type "System.Boolean". xy2xyzEffect C:\Program Files\dotnet\sdk\6.0.300-preview.22204.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets 1050 You have space characters. It needs to be exactly like this (case-insensitive): <UseWpf>true<UseWpf> Not like this: <UseWpf> true <UseWpf> Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted April 19, 2022 Share Posted April 19, 2022 OK that worked. No WindowsBase error - Removed reference to WindowsBase and changed to AnyCPU Build succeeded without warning PS @otuncelli You are missing the hash tag <UseWpf>true</UseWpf> Now to add those 3 2 lines when codelab generates the VS solution <UseWindowsForms>true</UseWindowsForms> <UseWpf>true</UseWpf> <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets> Who gets the solution tag? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 19, 2022 Share Posted April 19, 2022 Your text is invisible... Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
otuncelli Posted April 19, 2022 Share Posted April 19, 2022 3 hours ago, AndrewDavid said: PS @otuncelli You are missing the hash tag <UseWpf>true</UseWpf> *Slash Yup 😹 3 hours ago, AndrewDavid said: Who gets the solution tag? You shouldn't need to add ImportWindowsDesktopTargets. It's enabled by default if you add UseWPF. You can confirm this by looking at the .targets file: https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L1160 Quote Link to comment Share on other sites More sharing options...
BoltBait Posted April 19, 2022 Share Posted April 19, 2022 2 hours ago, Rick Brewster said: Your text is invisible... Wait--You don't access the message board in "dark mode"?! Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
AndrewDavid Posted April 19, 2022 Share Posted April 19, 2022 Note to self - Never use white as a text color 1 Quote Link to comment Share on other sites More sharing options...
John Scott Posted August 10, 2022 Share Posted August 10, 2022 I too am running into this - with Net6 and VS2022 I have not found a good solution at all - the best bet seems to be to ignore the warning (which is never a good idea) Enabling WPF/WinForms (which I don't need) seems less than ideal. I was speculating a binding redirect would help, but the csproj does not seem to like it. https://stackoverflow.com/questions/43365736/assembly-binding-redirect-how-and-why <dependentAssembly> <assemblyIdentity name="WindowsBase" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="4.0.0.0" newVersion="6.0.2.0" /> </dependentAssembly> ...or even trying it automatically - https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection Cheers John Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 11, 2022 Share Posted August 11, 2022 4 hours ago, John Scott said: Enabling WPF/WinForms (which I don't need) seems less than ideal. That's the solution. That's literally all you need to do. Binding redirects are a mess. And, I don't think they even work beyond .NET Framework -- they're a solution for a problem that no longer exists. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.