Visual Studio- Illegal characters in path

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>

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.


@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.