Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild v16.1 is not supported, aborting. #1001

Closed
robertnicjoo opened this issue Jun 11, 2019 · 6 comments
Closed

MSBuild v16.1 is not supported, aborting. #1001

robertnicjoo opened this issue Jun 11, 2019 · 6 comments

Comments

@robertnicjoo
Copy link

I am trying to make windows app with cordova but all i get is this error

ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
MSBuild v16.1 is not supported, aborting.
No valid MSBuild was detected for the selected target: AppPackages folder doesn't exist

What I'm using

IDE: Visual studio 2019 (known as v16)
Cordova 9
cordova-windows 7.0.0
BuildTools 15
OS: Windows 10
Ionic 5

What I did so far

Added MSBUILDDIR in system environments
Added VSINSTALLDIR in system environments
Added path of MSBuild in system environments

Yet I'm getting error.

Any idea?

@dpogue
Copy link
Member

dpogue commented Jun 11, 2019

Visual Studio 2019 cannot be used for building Cordova-Windows apps. See also apache/cordova-windows#327

@dpogue dpogue closed this as completed Jun 11, 2019
@robertnicjoo
Copy link
Author

@dpogue I just installed VS because it was required by ionic in order to apps recognize MSBuild and not to develop my app with it, I'm generally using ATOM as my editor the only reason I mentioned VS19 was that.

So would you mind please tell me why cordova can't get my installed MSBuild even when I set the location of it in my environments?

@dpogue
Copy link
Member

dpogue commented Jun 11, 2019

If you want to build cordova-windows apps, you must use Visual Studio 2017.

Visual Studio 2019 will not work.

@robertnicjoo
Copy link
Author

Ok thanks I try that

@robertnicjoo
Copy link
Author

@dpogue hi,

So I installed VS17 and now this is what I get:

ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Building project: C:\laragon\www\ionic\WinApp\platforms\windows\CordovaApp.Windows10.jsproj
        Configuration : debug
        Platform      : anycpu
        Buildflags    : /p:AppxBundle=Never
        MSBuildTools  : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
buildProject spawn: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild [ 'C:\\laragon\\www\\ionic\\WinApp\\platforms\\windows\\CordovaApp.Windows10.jsproj',
  '/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
  '/nologo',
  '/p:Configuration=debug',
  '/p:Platform=anycpu',
  '/p:AppxBundle=Never' ] { stdio: 'inherit' }
C:\laragon\www\ionic\WinApp\platforms\windows\CordovaApp.Windows10.jsproj(61,13): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\JavaScript\Microsoft.VisualStudio.WJProject.Default.props" was not found. Also, tried to find "Microsoft\VisualStudio\v15.0\JavaScript\Microsoft.VisualStudio.WJProject.Default.props" in the fallback search path(s) for $(MSBuildExtensionsPath32) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
No valid MSBuild was detected for the selected target: Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild: Command failed with exit code 1

Any idea?

@janpio
Copy link
Member

janpio commented Jun 11, 2019

Open an issues at https://github.com/apache/cordova-windows @robertnicjoo Include all the information that the template asks for.

Here are some updated docs that might help you: https://cordova.apache.org/docs/en/dev/guide/platforms/windows/index.html#common-problems-and-workarounds

@apache apache locked as resolved and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants