Home > Net >  Asset file 'project.assets.json' has no target for 'net6.0/win -x64' on wapproj
Asset file 'project.assets.json' has no target for 'net6.0/win -x64' on wapproj

Time:12-22

I have a C# Winforms app C DLL wapproj project for .MSIX file, I wanted to publish my app on x64 mode but when I want to generate packages. I have the error:

Asset file 'project.assets.json' has no target for 'net6.0/win -x64'. Check that the restore ran and you included 'net6.0' in TargetFrameworks for your project. You may also need to include 'win-x64' in your project's RuntimeIdentifiers.

It says it was on my package project.

Tried to add <TargetFramework>net6.0</TargetFramework>, delete bin and obj folder. Nothing worked.

CodePudding user response:

Maybe you can check the publish setting like this: enter image description here

CodePudding user response:

So I resolved my self by checking all .csproj, .vcxproj, .wapproj and adding <TargetFramework>net6.0</TargetFramework> and <RuntimeIdentifier>win-x64</RuntimeIdentifier>.

After deleting all bin and obj folder, recompiling and publishing, it resolved.

  • Related