web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

msbuild issue

(0) ShareShare
ReportReport
Posted on by 3,072 Most Valuable Professional

Since a few weeks, I get an error when I start "msbuild" in order to generate the PCF solution zip.

The error says:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\NuGet\16.0\Microsoft.NuGet.targets(186,5): error : Your project file doesn't list
'win' as a "RuntimeIdentifier". You should add 'win' to the "RuntimeIdentifiers" property in your project file and then re-run NuGet restore.

This get's fixed if I call

 

msbuild /t:restore

 

After that I don't have issues anymore, until the next day, no matter how often I run msbuild.

I'm sure this wasn't like this a few weeks ago. Has somebody an idea about the reason, or how to solve this in a proper way?

 

Kind regards,

Diana

I have the same question (0)
  • Danish N. Profile Picture
    186 on at

    Seems like I am not the only one. I though it was my msbuild versions so I tried changing that as well but no luck. And as you said if I run 

    msbuild /t:restore

    it works fine after that.

     

    Thank god I had put this command as default in my XrmToolBox version (maybe I had a déjà vu)

  • MichaelFP Profile Picture
    1,943 Moderator on at

    You have you update you Power Apps CLI and your PCF control is from the old version? Check it. I have some issues using differents version from PCF project and the Power Apps cli.

  • cchannon Profile Picture
    4,702 Moderator on at

    Anyone ever find a decent explanation for this? I am seeing the same thing now, but it doesn't clean up with a /t:restore

  • cchannon Profile Picture
    4,702 Moderator on at

    OK, so I still don't have any idea why it happened, but I downgraded my PAC to 1.5.3 and created a new project altogether, and it was able to build just fine. I doubt the downgrade had anything to do with it; my guess is that the same would have happened if I wiped package lock and ran npm install again. If I ever see it again, I will try more incremental steps to see if I can put a better answer in here.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard