Hi David,
It is now two days that I am trying to get a windows x64 build out of cordova but still no success. I have fixed a couple of issues so far that I leave here in case it helps some one later:
Error: MSBuild v4.0 is not supported, aborting.
Fix: by setting environment variable VSINSTALLDIR = C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
Even though Visual Studio 2017 was installed with Cordova libraries, still got bellow error:
Error: Windows SDK not found.
Fix: by installing the SDK separately (https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk)
Error: I got some errors pointing to Node.js
Fix: Installed all Node.JS libraries in VS and also updated Cordova to the last version, one of those should have fixed it since it was gone after I did those
NOW, I get this error and I could not find anything in the forums that could help me, so I thought you might have an idea
No valid MSBuild was detected for the selected target: AppPackages folder doesn't exist
I have tried different addresses in MSBUILDDIR environment, no success so far. Cordova requirements also passes everything!
cordova requirements
ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64
Requirements check results for windows:
Windows OS: installed Windows 10
MSBuild Tools: installed 15.9
Visual Studio: installed (user-specified via VSINSTALLDIR)
Windows SDK: installed 10.0
Windows Phone SDK: installed 10.0
My computer is a x64 machine on a 64 bit windows 10 with an AMD Ryzen 5 2400G APU
Any idea is very much appreciated
This is not specifically a question of App Builder... and we do good if search around the web, triying to find information around our problem, in relation with Apache Cordova... so probably we can get more useful information. Anyway, you need to be sure that you meet the requeriments for the Apache Cordova's Windows platform.
Said the above, that is, once we are ready with the Apache Cordova requeriments, what I can say is that I certainly run the "release" BAT file when want to compile an app for Windows, but, finally I end the work in Visual Studio, and, apparently, this is the easy way to do it. In other words: I am not sure if Apache Cordova can completely end the build of the app... or if we need to open Visual Studio after we compile the app with Apache Cordova.
What I can say is that I do the above with good results: I compile the app with the "release" BAT file, and, after that (no matter if we see some possible errors), I open the project file (which is created by Apache Cordova) with Visual Studio, and then debug and build the app from Visual Studio.
Thanks for the response David, I know it is more a cordova relevant issue, but since after a full day of search I could not find any post what so ever with my issue while having all the requirement checked, I thought it might have something to do with AB. Any how, I have read the link you sent and checked all the requirements in the link you have sent already. If you see in the question after running Cordova requirements command, all of them are checked.
Thanks for the tip however, I did not try to debug or do anything further in VS before I have all Cordova errors taking care of, because I though it is pointless!
I understand you. However, after we run a BAT file prepared by AB... any possible error or issue that we encounter are related with Apache Cordova... I mention it just to place a tip: if we search something like "error message Apache Cordova" in Google, probably we can get what we need...
On the other hand, please, try with Visual Studio. I certainly try a couple of apps in the Windows platform and works well. Just omitting any problem in the BAT file (that probably can be solved), and open the project file (that is created by Apache Cordova) in Visual Studio.
You must try that, Amin, it's more easy than appear. What I can't do until today is to get the entire app builded and ready to use just by using the BAT file, that is, just by using Apache Cordova. I need to open Visual Studio and deal a bit with it (basically choose Run, Debug, Build...).
I prepare a little video in order to shown how we can compile our apps for the Windows platform, with the help of Apache Cordova and Visual Studio. Once we are ready with Apache Cordova, note how we can't expect a complete app once we use the BAT file prepared for us by DecSoft App Builder: we can, however, use Visual Studio Community in order to open the project (generated by Apache Cordova) and then Build it, debug it, etc.
Wow, the video came unexpected!!! I watched it on my phone last night but did not get a chance to try it out. Just the tip you gave on not to mind the errors was a greaaat help. I am trying it out now, will leave it here how I proceed, You are a STAR David!
Hi David,
Still have no luck, VS throw an error, saying "unable to start debugging". Comparing the build process of yours and mine shows that you do not get
No valid MSBuild was detected for the selected target: AppPackages folder doesn't exist
I suppose it is a major error and things just won't work before it is fixed. I will try reinstalling everything to see what happens, Thanks a million for your help David
Hi David,
I finally made it! reinstalled visual studio and added any library I thought are remotely relevant (in addition to the ones I had to) and it started to work.
I suspect it was a missing library! or bad install of one!
Thanks a lot for your help! saved the day!
Glad to know that you finally got it. :-) I think that what we must choose, when installing Visual Studio Community, are the "Mobile Development with Javascript", and, probably also the "Web Development" tools. We must "check" these when installing Visual Studio Community. Here is a link with more information and details.
Anyway, I must recognize that I did not get a "complete build app" when use the BAT files for Apache Cordova, that is, in the same way that we can get an APK for Android or an IPA for iOS. What I get when use the BAT files for Apache Cordova for the Windows platform is a project ready to be use with Visual Studio. I use this way, but maybe a "directly" way exists... and I simply ignore it right now...
Hi David,
I am not sure either if there is another direct way, now my cordova has no errors and still I only get the VS project after build. I suppose based on Cordova website that is the way. Apart from libraries you mentioned and available in the link, I think for Appbuilder projects we need to add Node.js also to Visual Studio. It was frustrating but hope at least these posts help some one else later. Thanks alot for your help as always.
Certainly, the Node.js is required, but, it's required by Apache Cordova, not specifically for the Windows platform. According to the official documentation, what we need is only Visual Studio Community, which include the right SDK, if I am not wrong.
Certainly, maybe the things works in a similar way than the iOS platform: what we get is a project ready to be opened by XCode (which is the official IDE in Mac OS, in the same way than Visual Studio is for Windows), and then we can debug, build and distribute the app using XCode. Maybe a more directly way exists, but, I am more or less happy in these ways.
Update: From time ago Apache Cordova has been added the Cordova Electron platform, which allows to create apps for Windows (and other platforms) in a better way (in my opinion) than using the Cordova Windows platform. DecSoft App Builder (both, the previous generation and the current generation of the product) has been integrated with the Cordova Electron platform.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.