English 中文(简体)
与Microsoft.Office.Core 方法签字有关的问题
原标题:Issue with Microsoft.Office.Core method signatures

编译 Boo 项目时出现以下错误,

textbox = _ActiveWorkSheet.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, left, top, width, height)

Microsoft.Office.Interop.Excel.Shapes.AddTextbox(微软.Office.Office.Core.MsoTextIentation,单,单,单,单,单,单)与参数列表(微软.Office.Office.Core.MsoTextIentation,单,单,单)不兼容。 (BCE0017)

正如你可以看到的签名是相同的, 问题似乎是 承认MsoTextentication。

我为2010年安装了 PIA, 可以添加 COM “ 微软办公室 14. 0 对象图书馆 ” 的引用, 也可以从中导入 Microsoft. Office. Core 命名空间 。 它在方法签名时会分解 。

我使用的是装在SharpDevelop 3.2.1中的布编译器版本0.9.1.32.87。

有什么想法吗?

最佳回答

OK,OK, OK, OK, OK, OK, OK, OK, OK,OK, OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,OK,

将微软 Office. Core namespace 引入这个项目有两种方式:

  1. Import "Microsoft Office 14.0 Object Library" from COM (shows up as "Office" in your references)
  2. Import "office" from the GAC (shows up as "office" in your references)

我不知道为什么它只列在GAC 添加参考列表中的“办公室”而不是“微软. Office.Core ” 。 这就是为什么我错过了它,最后在COM上寻找它, 并且看到名称空间输入精细, 我以为一切都很好...

我对如何处理不同集会的相同命名空间知之甚少,但这种类型被标为不兼容的可能性是否仅仅是一个布/夏普特朗问题? 我希望更多人能有这样的问题:它发生在视觉演播室/C#上。

问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签