The "WireUpCoreRuntime" task failed unexpectedly Visual studio 2017

Viewed 696

I am developing UWP application for remote device using VS17. I suddenly got this message

Error       The "WireUpCoreRuntime" task failed unexpectedly.
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.InternalExecute()
   at Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() DataManagementApp           

And I am stuck at this error for about week. I dont know what cause it. Last thing that I made was that I move GPIO routines to external library. After that, each build ends with this message.

What I tried:

  • Turn off antivirus
    • Redo last update (library is working on other similar solutions)
    • Redo several last changes in build
    • update VS, repair VS and repair SDKs
    • update versions of libraries
    • reboot target device
    • build project on other PC (with fresh VS), copy code on brand new project and run it on my or other PC
    • get rid of anything that using Linq library in code.
    • Run VS as administrator

With no success at all. I will be very happy if anyone will help me with solving this problem.

2 Answers

I messed up with appxmanifest file. I use AppServices for background work. In this example they have got some changes in appxmanifest file, but they suddenly throws error.

    <Application Id="AppServicesProvider.App"
      Executable="$targetnametoken$.exe"
      EntryPoint="AppServicesProvider.App">

Have to be simplified into

<Application Id="App">

And it throws no error anymore.

I experienced the same error renaming the Assembly name for a UWP application.

I discovered you also need to open Package.appxmanifest and change the Entry point to the same value you used in Assembly name.

Related