Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Unanswered

msbuild issue

(0) ShareShare
ReportReport
Posted on by 3,072

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

  • cchannon Profile Picture
    cchannon 4,702 on at
    Re: msbuild issue

    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.

  • cchannon Profile Picture
    cchannon 4,702 on at
    Re: msbuild issue

    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

  • MichaelFP Profile Picture
    MichaelFP 1,547 on at
    Re: msbuild issue

    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.

  • Danish N. Profile Picture
    Danish N. 186 on at
    Re: msbuild issue

    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)

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard