Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing project.assets.json when running Publish Vs2019

When trying to create a 64 bit MSIX package using the Publish command in a VS 2019 WPF packaging project, we are getting the following error 'wappublish\win-x64\project.assets.json' not found... Run a NuGet package restore to generate this file'.

The packaging project itself builds fine and can be debugged. Running 'dotnet restore' from the package manager console does not help. We have noticed there is no win-x64 directory created under wappublish.

We are using VS 2019 16.7.4 Community Edition. Anyone any ideas what could cause this.

Thanks

like image 346
tech74 Avatar asked Aug 13 '26 12:08

tech74


1 Answers

I had this problem too, and my solution was to add the appropriate Platform configurations for Release:

Configuration Manager

This leads to all my .csproj-files gaining an element <Platforms>AnyCPU;x64</Platforms>

For the DDLView-project I also had to add a <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> element, probably because it's Windows-specific (DDLData is not Windows-specific)

like image 71
Pipelynx Avatar answered Aug 16 '26 22:08

Pipelynx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!