question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish fails from VS, because `project.assets.json` not found

See original GitHub issue

Describe the bug When I create a new Solution with an empty WinUI 3 Desktop app in VS 16.10.2. The project works both in Debug and Release configuration without error. However, when I use VS to create MSIX packages, the creation fails.

1>------ Publish started: Project: App10 (Package), Configuration: Release x86 ------
1>Determining projects to restore...
1>Restored C:\Users\Marvin\source\repos\App10\App10\App10.csproj (in 478 ms).
1>Assets file 'C:\Users\Marvin\source\repos\App10\App10\obj\wappublish\win10-x86\project.assets.json' not found. Run a NuGet package restore to generate this file.
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
========== Package: 0 succeeded, 2 failed ===========

This seems indeed correct, as the file project.assets.json it is looking for is in the path C:\Users\Marvin\source\repos\App10\App10\obj\wappublish\win-x86\project.assets.json (Notice the win-x86 instead of win10-x86)

Can I tell VS to look in the right directory?

Project source App10.zip

Build bin logs logs.zip

Version Info

NuGet package version:

WinUI 3 - Project Reunion 0.5: 0.5.7

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2021 Update (19043) Yes
October 2020 Update (19042)
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context This is how I created MSIX packages in VS: Right click in Solution Explorer on the Packaging project -> Publish -> Create App Packages. I select Sideloading, disable automatic updates, select my certificate for signing, select Release (x86) only. Generate app bundle “Always”.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
edwardskrodcommented, Jul 1, 2021

We are going to try to take this for 16.10.4. I will keep you posted.

1reaction
edwardskrodcommented, Jul 1, 2021

@Marv51 Thanks for reporting this issue. We fixed this in 16.11 Preview 3, which will ship in the middle of July. https://visualstudio.microsoft.com/vs/preview/

As a workaround, you can build and publish your application from the command line.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assets file project.assets.json not found. Run a NuGet ...
To fix this error from Tools > NuGet Package Manager > Package Manager Console simply run: dotnet restore. The error occurs because the ......
Read more >
NETSDK1004: Assets file not found - .NET CLI
This error occurs when the assets file project.assets.json is not found during build. The full error message is similar to the following ...
Read more >
Publishing a simple app fails with "project.assets.json not ...
This is a bug in Visual Studio affecting publish. Things were fine in 2019 16.9 then broke in 16.10.1 through 16.10.3. I am...
Read more >
Assets file '...\project.assets.json' not found." in Pipeline ...
Because this file is generated dynamically through package restore, it's typically not added to source control. As a result, this error occurs ...
Read more >
#VS2019 – How to fix the [obj\project.assets.json' not found ...
Hi! Quick post today. This one is to save me 30 minutes of internet search next time I face this error. Context: New...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found