building ionic3 cordova app for windows missing MakePri.exe - windows

I have problems while building > ionic cordova build windows --release
>cordova build windows --release --arch="x64"
Building project: C:_DEV\ionic\5tgf\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : release
Platform : x64
Patching 10 in prebuild event...
C:\Program Files x86)\MSBuild \Microsoft \VisualStudio \v14.0 \AppxPackage \Microsoft.AppXPackage.Targets(912,5): error APP X1639: fichier 'MakePri.exe' introuvable.
See http://go.microsoft.com/fwlink/?LinkID=798187 for more information.
[C:_DEV\ionic\5tgf\platforms\windows\CordovaApp.Windows10.jsproj]
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1}
Link to microsoft is down, tried google without much result.
I ve tried to modify path variable by adding way to MakePri.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64
Nothing work .. help me please :)

Related

Flutter windows app compile cmake error $<TARGET_FILE_DIR:testbed>

I'm actually trying to build a flutter app windows but i got this error message :
flutter build windows
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE_DIR:testbed>
No target "testbed"
CMake Generate step failed. Build files cannot be regenerated correctly.
Building Windows application...
Unable to generate build files
The error was repeated about 20 times.
There is no problem with the flutter doctor -v command :
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.3)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.6.30225.117
• Windows 10 SDK version 10.0.18362.0
If anyone have a solution, thanks to him.
I found where the error came from :
In the .\build\windows\CMakeCache.txt file at line 59 there is this :CMAKE_INSTALL_PREFIX:PATH=$<TARGET_FILE_DIR:testbed>
To solve my error i just need to replace testbed by my project name.
Just go build folder in your flutter project and delete the windows folder and everything will be back to normal

Ionic cordova build windows throw *MSBUILD* error

When i run ionic cordova build windows it throws error like-
> cordova build windows
ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
Building project: C:\Users\shail\Desktop\ionic-demo\ionic-4-windows\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
Buildflags : /p:AppxBundle=Never
MSBuildTools : C:\Program Files (x86)\MSBuild\14.0\bin
buildProject spawn: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild [ 'C:\\Users\\shail\\Desktop\\ionic-demo\\ionic-4-windows\\platforms\\windows\\CordovaApp.Windows10.jsproj',
'/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
'/nologo', '/p:Configuration=debug', '/p:Platform=anycpu', '/p:AppxBundle=Never'] { stdio: 'inherit' } C:\Users\shail\Desktop\ionic-demo\ionic-4-windows\platforms\windows\CordovaApp.Windows10.jsproj(61,5): error MSB4019: The imported project "C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Microsoft.VisualStudio..Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild: Command failed with exit code 1
is any one can help to resolve this problem.
ionic -v is 4.12.0
cordove -v is 9.0.0
installed platform
cordova platforn list
Installed platforms:
android 8.0.0
windows 7.0.0
Using Visual Studio 2017 Enterprise
According to the error message: The path of your msbuild tool is
invalid.
1.As for vs2017, the msbuild you use should be C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin instead of C:\Program Files (x86)\MSBuild\14.0\bin.
2.Also, v14.0 is for vs2015 while v15.0 for vs2017, please change all 'v14.0' in your setting to 'v15.0' and run it.

Build Failed after adding Kapsel Plugins to Cordova Project - Could not find SDK "Microsoft.VCLibs, Version=12.0"

I'm trying to make a Windows Cordova build using cmd but I'm getting below errors. Can any of you please guide me on how to fix this issue.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(
2377,5): error MSB3774: Could not find SDK "Microsoft.VCLibs, Version=12.0".
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe: Command failed with exit code 1
PS: I'm using Visual Studio Community 2017.

Error MSB6006 "MakeAppx.exe" Microsoft.AppXPackage.Targets debugging Visual Studio Cordova app on Windows Phone Device

I'm facing a problem when I'm trying to test a Cordova App in my Windows Phone.
First, my configuration:
Windows 8 Enterprise 64
Visual Studio Enterprise 2015, logged in with my Microsoft account
Windows 8.1 SKD
Application developed with Cordova, Ionic Framework
Windows Phone 8 (Nokia Lumia 625)
I'm able to run the application in an emulator, but when I'm trying to debugging my application on my Windows Phone, I got this error:
Severity Code Description Project File Line Suppression State
Error MSB6006 "MakeAppx.exe" exited with code 1. [C:\Projects\Tests\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\CordovaApp.Phone.jsproj] BlankCordovaApp6
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets 2439
I've setted the build output to detailed, and got this log:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2439,5): error MSB6006: "MakeAppx.exe" exited with code 1. [C:\Projetos\Testes\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\CordovaApp.Phone.jsproj]
1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild with args: C:\Projetos\Testes\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\CordovaApp.Phone.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=arm
1> Command finished with error code 2: cmd /s /c "C:\Projects\Tests\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\cordova\build.bat --debug --archs=arm --phone --buildConfig=C:\Projects\Tests\BlankCordovaApp6\BlankCordovaApp6\build.json"
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 2
1> Done executing task "MdaVsCli" -- FAILED.
After read this log, I reinstaled the SDK after noticed this line You may not have the required environment or OS to build this project, but no success
I've also tried to run with this command line, but same error:
cordova run --debug windows --device -- --phone --appx=8.1-phone
I've followed the steps here, but no success too:
https://taco.visualstudio.com/en-us/docs/run-app-windows-phone/
Any help and suggestions are welcome. Thanks.
UPDATE:
Following the #rido, I've tried to create a Windows Store App.
My VS2105 doesn't have this template, so I've installed. After created a empty Store App, Visual Studio asked to update my Microsoft Developer Licence.
Then, when I tried to build, I got an error noticing I was missing some platform requirements.
Looking for a solution, I followed the steps in this link: http://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/
After updated VS2015 Cordova, I was able to deploy for Android and Windows Phone but prior I had to register my Windows Phone for development, following this link: https://msdn.microsoft.com/pt-br/library/windows/apps/ff769508(v=vs.105).aspx
I hope these notes can help anyone else that has similar issues.
I followed the steps in this link, but no success: http://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/
After updated VS2015 Cordova, I was able to deploy for Android and Windows Phone but prior I had to register my Windows Phone for development, following this link: https://msdn.microsoft.com/pt-br/library/windows/apps/ff769508(v=vs.105).aspx
Hope this can help anyone with similar issue.

Visual Studio 2015 cannot create Release builds for Cordova project

I am using Visual Studio 2015 for Cordova Tools to build an app that targets Windows Universal (UWP) and Android.
I can successfully create Debug builds for both Android and UWP, Release build works for Android as well.
However Visual Studio fails to create Release builds for UWP, none of the Windows-AnyCPU, Windows x86, Windows x64 and Windows ARM options works.
When creating Release builds for Windows-AnyCPU, the error message is like:
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(133,5): error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.NET.Native.Framework.1.2, Version=1.2". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM". [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(133,5): error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.NET.Native.Runtime.1.1, Version=1.1". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM". [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(248,5): error MSB4062: The "IlcErrorTask" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\ilc.exe. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\ilc.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild with args: C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=release,/p:Platform=anycpu
1> Command finished with error code 2: cmd /s /c ""C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\cordova\build.bat" --release "--buildConfig=C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\build.json" --archs=anycpu --win"
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 2
When creating Release builds for Windows x86, Windows x64 or Windows ARM, the error message is like:
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(669,5): error MSB4062: The "SharedAssemblyApplicabilityVerifierTask" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets(405,5): error MSB4062: The "ComputeManagedBinaries" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe. Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\ilc.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj]
1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild with args: C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=release,/p:Platform=x64
1> Command finished with error code 2: cmd /s /c ""C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\platforms\windows\cordova\build.bat" --release "--buildConfig=C:\Users\ztl87\Documents\Visual Studio 2015\Projects\UnihanHelper\UnihanHelper\build.json" --archs=x64 --win"
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 2
What confuses me is that all of these 4 configurations works fine with Debug builds.
Moreover, Visual Studio stops working when I try to associate the app with the Windows Store.
I am using:
Visual Studio Community 2015 Version 14.0.24720.00 Update 1
Visual Studio Tools for Apache Cordova 14.0.51016.1
Cordova CLI version
5.4.1
I've tried reinstalling Visual Studio, but it didn't work.
Thanks.
I spent hours struggling with this and was able to solve it finally by uninstalling Node 64 bit and installing 32 bit.
You can specify the architecture and the platform you want to build the Windows app in.
cordova build --release windows --appx=[platform] --archs=[architecture]
Options:
Platform: 8.1-win, 8.1-phone, uap
Architecture: x86, x64, arm
For Example:
cordova build --release windows --appx=uap --archs=arm
Reference: https://cordova.apache.org/docs/en/latest/guide/platforms/win8/
Visual Studio stops working when I try to associate the app with the Windows Store.
This is a bug that has just been fixed in Visual Studio 2015 Update 2. Here's a link to the installer: http://go.microsoft.com/fwlink/?LinkId=691129

Resources