0

Due to a system meltdown I had to reinstall windows and visual studio. Now when I try to open a project from source control (Multi-Device Hyrbid App) it fails with the following message:

C:\Users\Anthony\Source\Workspaces\...\theapp.jsproj : error  : The imported project "C:\Users\Anthony\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  C:\Users\Anthony\Source\Workspaces\...\theapp.jsproj

Everything is installed in VS 2015 Preview and other projects (.net, c#).

Can anyone please advise me how I get the referenced node module in place correctly?

Thanks!

anthonyhumphreys
  • 1,051
  • 2
  • 12
  • 25

2 Answers2

4

Here's an excerpt from the online FAQ on how to upgrade a project created in an earlier version of the tooling:

"While we do not fully support upgrading projects from one CTP to another and strongly recommending copying over your assets to a new project created with CTP3, here are some steps to mitigate the issue:

Open CTP2.0 project in VS

If this fails with an error message similar to:

"The imported project "C:\Users\testuser\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets" was not found."

Confirm that the path in the declaration is correct, and that the file exists on disk.

Then open the jsproj file in the editor (Right-click and select Edit myproject.jsproj) and modify the path in following lines:

<Import Project="$(AppData)\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets" /> 
<Import Project="$(AppData)\npm\node_modules\vs-mda-targets\Microsoft.TypeScript.MDA.targets" />

To look like these:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CordovaTools\vs-mda-targets\Microsoft.MDA.targets" /> 
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CordovaTools\vs-mda-targets\Microsoft.TypeScript.MDA.targets" />
Ellen
  • 1,189
  • 7
  • 9
0

@Ellen is right. I had to press Modify in Programs and Settings on VS2015 and add the Cordova tools again. Then I had to create a new Cordova Project and run it. I'm not 100% sure if thats necessary but it installed some packages while doing that. Then I copied the Import Lines in the *.jsproj file "Microsoft.MDA.targets" and "Microsoft.TypeScript.MDA.targets" from the new project to my old project and pressed right click reload.

CodingYourLife
  • 7,172
  • 5
  • 55
  • 69