The "AssignTargetPath" task failed unexpectedly
<p>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.</p>

<p>Error:</p>

<pre><code>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.&lt;ExecuteInstantiatedTask&gt;d__26.MoveNext()
Done building project "BuyCo.njsproj" -- FAILED.

Build FAILED.
</code></pre>

<p>When checking the interwebs the problems seems related to the MAXPATH issue with Node/npm.
<a href="http://visual2073.rssing.com/chan-25873606/all_p116.html" rel="nofollow">http://visual2073.rssing.com/chan-25873606/all_p116.html</a>
<a href="https://nodejstools.codeplex.com/workitem/759" rel="nofollow">https://nodejstools.codeplex.com/workitem/759</a>
<a href="https://nodejstools.codeplex.com/workitem/1340" rel="nofollow">https://nodejstools.codeplex.com/workitem/1340</a></p>