Ego Eram Reputo Posted February 9, 2022 Share Posted February 9, 2022 Thought I might drop this in for others to find. VS2022 gave me this error..... Quote 1>------ Build started: Project: Planetoid, Configuration: Debug|AnyCPU ------ 1>C:\Program Files\dotnet\sdk\6.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): error NETSDK1004: Assets file 'C:\Users\Scott\Source\Repos\Planetoid\Planetoid\Planetoid\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Build failed. Open Tools > NuGet Package Manager > Package Manager Console > At the command prompt, type dotnet restore <solution name> 1 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
otuncelli Posted February 10, 2022 Share Posted February 10, 2022 (edited) There is an issue in VS 2022 v17.06. https://github.com/dotnet/core/issues/7176 It links against .NET 6.0.2 System.Windows.Forms.dll instead of linking the reference (6.0.0) library. This means if you're using Windows Forms or WPF and if you compile with VS 2022 v17.06, it will only be compatible with 4.3.8/.NET 6.0.2 and later (which is not released yet). I did a mistake by updating my Visual Studio. Now, I can't work on any of my plugins because of this. 🤦♂️ Edit: I've applied the suggested workaround for now. <ItemGroup> <FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" /> </ItemGroup> Edited February 19, 2022 by otuncelli workaround update 1 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 10, 2022 Share Posted February 10, 2022 Well, thankfully 4.3.8 is pretty much wrapped up and just about ready for a public beta 1 2 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...
midora Posted February 10, 2022 Share Posted February 10, 2022 I'm getting analyzer warnings like the following one. TargetFramework is net6.0-windows and VS is up-to-date. Any idea? Warning CS8032 An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.2\analyzers\dotnet\cs\System.Text.Json.SourceGeneration.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. That's a PropertyBasedEffect plugin. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 12, 2022 Share Posted February 12, 2022 On 2/10/2022 at 3:35 PM, otuncelli said: There is an issue in VS 2022 v17.06. https://github.com/dotnet/core/issues/7176 It links against .NET 6.0.2 System.Windows.Forms.dll instead of linking the reference (6.0.0) library. This means if you're using Windows Forms or WPF and if you compile with VS 2022 v17.06, it will only be compatible with 4.3.8/.NET 6.0.2 and later (which is not released yet). I did a mistake by updating my Visual Studio. Now, I can't work on any of my plugins because of this. 🤦♂️ Edit: I've applied the suggested workaround for now. https://github.com/dotnet/winforms/issues/6663#issuecomment-1034371295 You are my hero as of this moment @otuncelli . Thank you! ⭐ 1 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 19, 2022 Share Posted February 19, 2022 On 2/10/2022 at 3:35 PM, otuncelli said: There is an issue in VS 2022 v17.06. https://github.com/dotnet/core/issues/7176 It links against .NET 6.0.2 System.Windows.Forms.dll instead of linking the reference (6.0.0) library. This means if you're using Windows Forms or WPF and if you compile with VS 2022 v17.06, it will only be compatible with 4.3.8/.NET 6.0.2 and later (which is not released yet). I did a mistake by updating my Visual Studio. Now, I can't work on any of my plugins because of this. 🤦♂️ Edit: I've applied the suggested workaround for now. https://github.com/dotnet/winforms/issues/6663#issuecomment-1034371295 I've just updated VS2022 to version 17.1.0 and can confirm that the issue has been resolved- so no need to use the workaround 1 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
otuncelli Posted February 19, 2022 Share Posted February 19, 2022 (edited) 10 hours ago, Ego Eram Reputo said: I've just updated VS2022 to version 17.1.0 and can confirm that the issue has been resolved- so no need to use the workaround It's .NET 6.0.2's issue rather than Visual Studio's. You won't get any errors because you've updated Paint.NET to 4.3.8 which is now released. Currently, I wouldn't release a plugin targeting PDN 4.3.8. I know there is "MAKE SURE YOU HAVE THE LATEST VERSION" rule but it'd still be a wise choice to support older PDN versions as much as possible to at least decrease amount of error reports coming from users who are using older PDN for some reason. Unfortunately, this won't be fixed until .NET 6.0.3 and the next PDN are released. Edited February 19, 2022 by otuncelli 1 1 Quote 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.