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
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.
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
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.
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)