2

I create Blank Express Application in Visual Studio 2013. After it installs npm modules I run it. it works well with no errors. But if I close solution and than open it again project load failes and I see errors in output window saying "The specified path, file name, or both are too long. The fully qualified file name must be less than 260". What should I do fix it?

Update: csproj file

    <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
    <Name>ExpressApp7</Name>
    <RootNamespace>ExpressApp7</RootNamespace>
  </PropertyGroup>
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>83aac9f6-1094-40fc-8ce9-2ca0fe8ccbac</ProjectGuid>
    <ProjectHome>.</ProjectHome>
    <StartupFile>app.js</StartupFile>
    <SearchPath>
    </SearchPath>
    <WorkingDirectory>.</WorkingDirectory>
    <OutputPath>.</OutputPath>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
    <ProjectView>ProjectFiles</ProjectView>
    <NodejsPort>1337</NodejsPort>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="app.js" />
    <Compile Include="routes\index.js" />
    <Compile Include="routes\user.js" />
    <Content Include="package.json" />
    <Content Include="public\stylesheets\style.styl" />
    <Content Include="README.md" />
    <Content Include="views\index.jade" />
    <Content Include="views\layout.jade" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="public\" />
    <Folder Include="public\images\" />
    <Folder Include="public\javascripts\" />
    <Folder Include="public\stylesheets\" />
    <Folder Include="routes\" />
    <Folder Include="views\" />
  </ItemGroup>
  <Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>0</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl></IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>True</UseCustomServer>
          <CustomServerUrl></CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
        <WebProjectProperties>
          <StartPageUrl>
          </StartPageUrl>
          <StartAction>CurrentPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <SilverlightDebugging>False</SilverlightDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
          <StartCmdLineArguments>
          </StartCmdLineArguments>
          <StartWorkingDirectory>
          </StartWorkingDirectory>
          <EnableENC>False</EnableENC>
          <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>
8
  • 1
    stackoverflow.com/questions/2054625/… Commented Feb 10, 2014 at 15:00
  • That answer suggests to find all '..\..\' occurencies in the .csproj file. I don't have any. I think this problem is somehow related to npm modules that were automatically loaded to the project Commented Feb 10, 2014 at 19:47
  • You dont have a csproj file or no relative paths? If you look at all the related questions on the right side it should be clear that this error comes from VS and your projectfile. But i'm just guessing here since I cant see your files... Commented Feb 10, 2014 at 20:52
  • no '..\..\' string in relative paths Commented Feb 10, 2014 at 21:26
  • Also could be related to path variables. Best is you show us your projectfile. Commented Feb 11, 2014 at 10:47

1 Answer 1

0

There are several path variables in your file which are concatenated to your actual paths. For example: $(VSToolsPath), $(MSBuildExtensionsPath32), $(MSBuildExtensionsPath)

Also you have realtive paths (which are hard to recognise as paths) like this one:

<WorkingDirectory>.</WorkingDirectory>

I bet your issue comes from here (line 49):

<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />

So check the default paths in VisulaStudio Settings, the custom paths in your project settings and try to move everythin to lower directory level.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.