Visual Studio- Illegal characters in path

前端 未结 5 1821
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 12:43

This happen after Visual Studio Community 2017 latest update. Every time I try to open my project I get following warning:

Warning IDE0006 Error e

相关标签:
5条回答
  • 2021-01-18 13:22

    I had a similar problem but in my case, it was down to strange characters in a Reference:

    <Reference Include="Office, Version=11.0.0.0, &#xD;&#xA;        Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    <Reference Include="stdole, Version=7.0.3300.0, &#xD;&#xA;        Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    

    Changing the above to:

    <Reference Include="Office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    

    Resolved this particular issue.

    Tip: I resolved this with trial and error. I commented out all of the ItemGroups in the csproj file and reintroduced them one by one. Although your project may fail to build during this process it is clear when the above error occurs as you will see just this error and not other build errors due to missing ItemGroups.

    0 讨论(0)
  • 2021-01-18 13:32

    This solution works if you are facing the problem with Azure Function.

    1. Close your Visual Studio
    2. Type %localappdata% in Start(Window Search)
    3. Delete Folder AzureFunctionsTools
    4. Restart Visual Studio
    5. Select Your Project and Run.

    It works!

    0 讨论(0)
  • 2021-01-18 13:38

    In your case the problem is the line returns in the following reference:

    <Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
          <HintPath>
          ..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
          </HintPath>
    </Reference>
    

    Change this to:

     <Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
          <HintPath>..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
     </Reference>
    
    0 讨论(0)
  • 2021-01-18 13:38

    I was also facing the same problem with this line

      <HintPath>&gt;$(SolutionDir).lib\Foo.Bar.dll</HintPath>
    

    Removing &gt; worked for me.

      <HintPath>$(SolutionDir).lib\Foo.Bar.dll</HintPath>
    
    0 讨论(0)
  • 2021-01-18 13:40

    @Delfi - I updated VS 2017 on Friday 2017-08-18 and starting getting the same "ResolvePackageFileConflicts" build error today on some projects. I noticed the issue happening when any reference in the .csproj file has a Hintpath. After using Notepad to remove the Hintpath from affected references the builds work fine now.

    This appears to be an issue with the latest VS 2017 update. Visual C# 2017 00369-60000-00001-AA019 Microsoft Visual C# 2017

    Example:

    <Reference Include="Atalasoft.dotImage.WinControls, Version=10.0.6.53316, Culture=neutral, PublicKeyToken=2b02b46f7326f73b, processorArchitecture=x86">
     <HintPath>..\..\..\..\..\Program Files\Atalasoft\DotImage 10.0\bin\4.0\Atalasoft.dotImage.WinControls.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    

    Changed to...

    *<Reference Include="Atalasoft.dotImage.WinControls, Version=10.5.0.61849, Culture=neutral, PublicKeyToken=2b02b46f7326f73b, processorArchitecture=x86">
      <SpecificVersion>False</SpecificVersion>
    </Reference>*
    

    Hope this helps you with your issue.

    Note: I did not try it but this could also probably be fixed by removing and re-adding the affected references in the project through the solution explorer.

    0 讨论(0)
提交回复
热议问题