The “ParseILMergeInfoTask” task failed unexpectedl

2019-07-25 11:22发布

问题:

The program is executing properly without any error in Debug configuration But in Release configuration it throws an error.

The "ParseILMergeInfoTask" task failed unexpectedly.
System.Exception: File 'SharedAssemblyILMergeInfoFilePath' passed to argument 'x86\ret\SharedAssemblyILMergeInfo.csv' does not exist.
  at Microsoft.Build.ILTasks.ParseILMergeInfoTask.Execute()
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
  at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I can't run any program in Release configuration. It throws the same error.

Update

I think I found the problem but I don't know to resolve it. Previously I had an error Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'. To resolve it I follow it this answer. So I installed Microsoft.Net.Native.SharedLibrary-x64.1.6.1, Microsoft.Net.Native.SharedLibrary-x86.1.6.1 and Microsoft.Net.Native.SharedLibrary-arm.1.6.1 manually. Now If I open Microsoft.Net.Native.SharedLibrary-x64 package folder I can't find build and tools folder within it.

回答1:

It is a problem due to the Internet connection.

  1. Just delete the package C:\Users\ponvi\.nuget\packages\microsoft.net.native.sharedlibrary-x64
  2. Download the package using Mobile Data.

Another answer by rubStackOverflow

Really strange issue, in my case, I had to change my default network DNS(network card) from 8.8.8.8 to 208.67.222.222.