Search code examples
windowsvisual-studiomsbuildmsix

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


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.


Solution

  • 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.