question

VoyTec avatar image
0 Votes"
VoyTec asked JunjieZhu-MSFT commented

UWP Creating app packager error.

262044-a.png



I get this error sometimes. Sometimes restarting computer helps, or deleting temporary files from Project's folder.
How to prevent it? Why do I get this error?

(I have newest update of vs2022 installed)
(my project is in OneDrive folder (Documents), but my OneDrive app is paused)

windows-uwp
a.png (84.6 KiB)
· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VoyTec ,

There are many reasons for this problem, you can try the following three workarounds.

  • Try to update the Microsoft.NETCore.UniversalWindowsPlatform NuGet package to the latest version.

  • Clear NuGet Cache(s). In Visual Studio 2022, use the Tools > NuGet Package Manager > Package Manager Settings menu command, then select Clear All NuGet Cache(s)

  • Select x86 or x64 to run the program.

  • Put your project in a non-OneDrive folder.

Thank you,
Junjie


1 Vote 1 ·
VoyTec avatar image VoyTec JunjieZhu-MSFT ·

I will try it next time, thanks.

0 Votes 0 ·
VoyTec avatar image VoyTec JunjieZhu-MSFT ·

So, Junjie. It does not work. I still have to delete some of compiliant stuffs to make it work again.
I still have on OneDrive and it works and sometimes it doesn't. Moving to non-OneDrive still does not help.
I have updated all the features of vs2022 frequently.
Clearing NuGet didn't help.
I used x86 at the beginning with failures sometimes and now on x64 with failures sometimes.

0 Votes 0 ·

Could you please share a screenshot of your project References?
Try uninstalling all NuGet Packages and installing them again.

1 Vote 1 ·
Show more comments

It seems to be the same problem I already had. There has been no real solution so far. My projects are not in a Onedrive folder. I simply reinstalled Windows 11 and VS 2022 in VMWare. After that, the problem has not reappeared so far. Nevertheless, it would be nice if the reason for the problem was known. I have reported the problem in the Developer Feedback. If you want, you can leave a comment there.


1 Vote 1 ·
VoyTec avatar image VoyTec Heiko-6891 ·

OK, thanks for reply.

0 Votes 0 ·

Hi @VoyTec ,

May I ask have you tried @Heiko-6891 's solution?
I have been unable to reproduce your problem, it seems to be related to your computer environment.

Thank you,
Junjie

1 Vote 1 ·

0 Answers