I suddenly got this error when building/debugging my Node project with Node Tools for Visual Studio (v1.1, not RC anymore). I was using Visual Studio Community Edition 2015 . I use Typescript, and also have the currently latest version of Typescript, e.g. v1.7.6.
Error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Node.js Tools\Microsoft.NodejsTools.targets(119,5): error MSB4018: The "AssignTargetPath" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at Microsoft.Build.Tasks.AssignTargetPath.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Done building project "BuyCo.njsproj" -- FAILED.
Build FAILED.
When checking the interwebs the problems seems related to the MAXPATH issue with Node/npm. http://visual2073.rssing.com/chan-25873606/all_p116.html https://nodejstools.codeplex.com/workitem/759 https://nodejstools.codeplex.com/workitem/1340