繁体   English   中英

在Ubuntu 16.04上使用Rider的C#项目中的“未找到项目”和“未将对象引用设置为对象的实例”

[英]“Project not found” and “Object reference not set to an instance of an object” in a C# project using Rider on Ubuntu 16.04

我刚刚在Ubuntu 16.04笔记本电脑上安装了monoJetbrains Rider ,并且正在尝试构建项目,但是出现此错误:

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

这是Rider的屏幕截图: 在此处输入图片说明

我不明白这是指什么对象,但是当我单击查看日志时,看到以下消息:

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.

我已经看到了另一个Stackoverflow问题,但这并没有帮助我。 任何指针都将非常受欢迎。 到目前为止,我还没有弄清楚为什么需要此“ AxImp.exe”。

您的项目中有COM引用。 非Windows平台不支持此功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM