Visual Studio/Multi Device Hybrid Apps CTP / Cordova - The imported project was not found

送分小仙女□ 提交于 2019-12-04 01:44:56

问题


When I attempt to create a new blank Cordova app in Visual Studio 2013 with the Multi Device Hybrid Apps CTP I get the following error message.

Has anybody else experienced this? I was thinking that it could be a Node/NPM issue but they both work correctly on my machine (before and after the install).


Edit: I should have mentioned that I already tried the answer found here: Cordova Multi-Device Hybrid Apps (Preview) for Visual Studio | Can't load project.


回答1:


MDHA projects require that Node be installed on your machine to be able to create a project. While you mention that NodeJS is installed, there's a possibility it may be stale or corrupted.

Try these steps:

  • Close VS
  • Uninstall NodeJS
  • Reboot machine
  • Install NodeJS from nodejs.org
  • Start VS and try to create a project

This should resolve your issue.




回答2:


I had the same exact error as Levi and it was because a few directories were not created in the node_modules directory during installation. Re-installing node and/or the entire CTP2.0, restarting, clapping my hands, screaming, etc would not fix this in my environment. On another PC, this worked fine. To fix this problem:

  1. Navigate to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\ and search for "vs-mda". You should find both a "vs-mda" and "vs-mda-targets" folder. (Make a recursively search, you won't find the folders exactly in "Extensions", there are inside of a random-named folder)
  2. Copy those two folders to the location the error is complaining about%appdata%\npm\node_modules\
  3. Restart Visual Studio and the error should go away

Now, once this worked, I still got an error about the Git CLI missing. That was solved with this answer.

I hope this helps!



来源:https://stackoverflow.com/questions/24618575/visual-studio-multi-device-hybrid-apps-ctp-cordova-the-imported-project-was

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!