This happen after Visual Studio Community 2017 latest update. Every time I try to open my project I get following warning:
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. Core.Tests
Then when I run build I get:
Error The "ResolvePackageFileConflicts" task failed unexpectedly. System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.GetFileName(String path)
at Microsoft.NET.Build.Tasks.ItemUtilities.GetTargetPath(ITaskItem item)
at Microsoft.NET.Build.Tasks.ItemUtilities.GetReferenceTargetPath(ITaskItem item)
at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.<>c. < ExecuteCore > b__35_1(ConflictItem ci)
at Microsoft.NET.Build.Tasks.ConflictResolution.ConflictResolver`1.ResolveConflicts(IEnumerable`1 conflictItems, Func`2 getItemKey, Action`1 foundConflict, Boolean commitWinner, Action`1 unresolvedConflict)
at Microsoft.NET.Build.Tasks.ConflictResolution.ResolvePackageFileConflicts.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.< ExecuteInstantiatedTask >d__26.MoveNext() Core.Tests
and afterwards
Error CS0006 Metadata file 'C:\tmp\backend\Tests\DataLoader.Tests\bin\Debug\DataLoader.Tests.dll' could not be found EResourceConnector.Tests C:\tmp\backend\Tests\EResourceConnector.Tests\CSC 1 Active
Path to the project is in latin only characters. On the build server build is working but on my computer after last update of VS is not. I've tried to reinstall VS but that didn't help.
So is there any solutions or at least hint for this issue?
EDIT: I tried to exclude files which are affected by this issue and that worked. But that is not solution for my problem. Interesting is, that are only affected files are unit tests.
EDIT2: I tried to build whole solution on the fresh Windows 10 with latest Visual Studio 2017 and it's failing so it is obviously my solution's problem but only in the new version of VS. I tried my solution on the Visual Studio 2015 and build worked fine.
Anyway, here's for example Core.Test.csproj
file which is one of these that are causing that issue. https://pastebin.com/kq7MFLV1
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With