0

I've just installed mono and Jetbrains Rider on my Ubuntu 16.04 laptop and I'm trying to build a project, but I get this error:

Object reference not set to an instance of an object
  at Microsoft.Build.BackEnd.TaskExecutionHost.GetItemOutputs (Microsoft.Build.Framework.TaskPropertyInfo parameter, Microsoft.Build.Construction.ElementLocation parameterLocation) [0x00013] in <bdc5207a22bb42ae9fe3f3d07e82871e>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.GatherTaskOutputs (System.String parameterName, Microsoft.Build.Construction.ElementLocation parameterLocation, System.Boolean outputTargetIsItem, System.String outputTargetName) [0x00153] in <bdc5207a22bb42ae9fe3f3d07e82871e>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.GatherTaskOutputs (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask, Microsoft.Build.BackEnd.ItemBucket bucket) [0x00180] in <bdc5207a22bb42ae9fe3f3d07e82871e>:0 
  at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00555] in <bdc5207a22bb42ae9fe3f3d07e82871e>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9bbab8f8a2a246e98480e70b0839fd67>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9bbab8f8a2a246e98480e70b0839fd67>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9bbab8f8a2a246e98480e70b0839fd67>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9bbab8f8a2a246e98480e70b0839fd67>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <9bbab8f8a2a246e98480e70b0839fd67>:0 
  at Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__24.MoveNext () [0x000d7] in <bdc5207a22bb42ae9fe3f3d07e82871e>:0 
--- End of stack trace from previous location where exception was thrown ---

Here's a screenshot from Rider: enter image description here

I don't understand what object this is referring to, but when I click to see the logs I see this message:

Build started 5/4/2018 5:28:51 PM.
__________________________________________________
Project "/home/stian/dev/name-removed/common-util/common-util.csproj" (build target(s)):

Target ResolveComReferences:
    /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2686,5): warning MSB3084: Task attempted to find "AxImp.exe" in two locations. 1) Under the "/usr/lib/mono/4.5/" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "/usr/lib/mono/4.5/" which is specified by the SDKToolsPath property. You may be able to solve the problem by doing one of the following:  1) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK.
    /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2686,5): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPath "/usr/lib/mono/4.5/" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7.1\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed

  Done building project "common-util.csproj" -- FAILED.

I've seen this other Stackoverflow question but it didn't help me. Any pointers would be very welcome. So far I haven't managed to figure out why this "AxImp.exe" is needed.

L42
  • 3,052
  • 4
  • 28
  • 49

1 Answers1

1

You have COM-reference in your project. It's not support on the non-Windows platform.

  • Thank you very much for answering. I'm quite new with c# - do you know how could I figure out what that reference is? – L42 May 04 '18 at 19:37
  • We will add diagnostics for that problem. Right now you can try to find reference with yellow warning icons in solution explorer. – Mikhail Filippov May 05 '18 at 20:51
  • Thanks. I found the references in the .cproj file under a `` section. – L42 May 08 '18 at 07:15