Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
531 views
in Technique[技术] by (71.8m points)

visual studio 2013 - Cannot create new project (VS2013 and multi-hybrid device app)

I get the error below when I try to create a new project. I've upgraded to CTP2. Error:

The expression """.Substring(0, 6)" cannot be evaluated. Index and length must refer to a location within the string. Paramter name: length C:USERSMEAppDataRoaming pm ode_modulesvs-mda-targetsMicrosoft.MDA.targets

When this error occurs and I check the solution folder, no project has been created.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

With VS closed, in a command window, run
npm -g uninstall vs-mda and npm -g uninstall vs-mda-targets

Check to see if this removed the vs-mda and vs-mda-targets folders under
C:UsersYOUR-USER-NAMEAppDataRoaming pm ode_modules
If it didn't, you can delete those folders manually.

Then relaunch VS and create an MDHA project. It should work successfully.

If you get an error on project creation saying that the MDA targets were not found, you can manually install 'vs-mda' & 'vs-mda-targets' from under Visual Studio's Extension folder to get things working again.

Exit Visual Studio and on the drive where Visual Studio is installed, navigate to
%Program Files%Microsoft Visual Studio 12.0Common7IDEExtensionsuxbwjkun.gjn*packages
Here you will find two folders "vs-mda" and "vs-mda-targets"

  • Note that uxbwjkun.gjn will not be the exact folder name, but look for something like it that contains packages folder.

Now from here run npm -g install <full path to current folder>vs-mda and npm -g install <full path to current folder>vs-mda-targets

When issuing this command it's necessary to give it the explicit path to the vs-mda and vs-mda-targets folders under the VS installation in %Program Files%.

Relaunch and create a new MDHA project.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...