Jump to content

VS2022 and pdn 4.3.4 set-up advice please. 21/12/2021


Red ochre
 Share

Recommended Posts

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>

 

  • Upvote 1
Link to comment
Share on other sites

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 by otuncelli
workaround update
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

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.

 

midoras signature.gif

Link to comment
Share on other sites

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!

  • Hugs 1
Link to comment
Share on other sites

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 :)

  • Like 1
Link to comment
Share on other sites

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 by otuncelli
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...