Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Version error during packaging

(0) ShareShare
ReportReport
Posted on by 40

Hi there,

I have updated to the latest tooling using pac install latest and created my project from the scratch using latest tooling (so its not an upgrade scenario, its a fresh project using the latest CLI v 0.3.4)

 

My pcfproj, cdsproj and devDependencies files already have got the versions as mentioned here

 

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/get-powerapps-cli#update-microsoft-powerapps-cli-to-the-latest-version

 

I can compile the project file using npm run build, but I cannot package it. My issue is when I do 

msbuild /t:restore

I get an error saying error MSB4066: The attribute "Version" in element <PackageReference> is unrecognized.

 

Thats the cdsproj node that it is complaining about

<ItemGroup>
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="0.*" />
</ItemGroup>
  • RyanXExner Profile Picture
    96 on at
    Re: Version error during packaging

    @jopursle, that worked..thank you!  I was using the Terminal in Visual Code instead. 🙄

    Very much appreciate all of your quick responses and help!

  • JP-09110045-0 Profile Picture
    on at
    Re: Version error during packaging

    @RyanXExner When running the command with the developer tools, are you running it from the "Developer Command Prompt for VS 2019" command prompt?  That should have all the paths set correctly.

  • RyanXExner Profile Picture
    96 on at
    Re: Version error during packaging

    @jopursle, I'm still getting the same error after installing the developer tools.  Do you know what the path is to the correct version of MSBuild?  

     

    Originally, I was getting an error message that MSBuild did not exist, so I put in a reference to it in the Program Files (x86) folder.  But I'm not sure that's the correct version or not.  Also, all of the articles I find online about the error indicates it's an incorrect version of MSBuild.

  • JP-09110045-0 Profile Picture
    on at
    Re: Version error during packaging

    One option if you don't want to install the full Visual Studio, is you can download the "Build Tools for Visual Studio 2019" which should be able to compile pcfproj files successfully. 

    From https://visualstudio.microsoft.com/downloads/, just scroll to the bottom and expand "Tools for Visual Studio 2019" in the "All downloads section" and select "Build Tools for Visual Studio 2019"

  • RyanXExner Profile Picture
    96 on at
    Re: Version error during packaging

    @devendramsft, how do you resolve this error when you only have Visual Code?

    image.png

  • Verified answer
    devendramsft Profile Picture
    Microsoft Employee on at
    Re: Version error during packaging
    Can you please try using "Developer Command Prompt for VS 2017/ 2019" to run msbuild commands? You might be using a normal command prompt where you might have an additional copy of older version of msbuild in your path.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard