在 Visual Studio 中使用 Saxon .NET XSLT 处理器不适用于智能感知 [英] Using Saxon .NET XSLT processor does not work with intellisense in Visual Studio

查看:34
本文介绍了在 Visual Studio 中使用 Saxon .NET XSLT 处理器不适用于智能感知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用用于 .NET 的开源

<小时>

注意:由于这篇文章是旧的,它当时可能只适用于 Visual Studio 2008,我没有测试过,因为我不再使用它了.

I am using the open source Saxon XSLT processor for .NET to execute some 2.0 transforms.

I reference the saxon9api.dll as I would any other dll, and can compile code against this. However Visual Studio does not show any intellisense making the IDE as useful as notepad.

The saxon9api.dll is using the IKVM Java for .NET platform, and I wonder if this is the causing VS a problem. Reflector can inspect the DLL without issue, but I suspect VS is not happy for some reason.

Any ideas?

EDIT:

Surprised that no one else has encountered this behaviour seeing as Microsoft recommends (link is now dead) the use of Saxon in the absense of built in functionality in the framework.

I think I will reword the question to be about assemblies running under IKVM not showing intellisense although I will need to find another IKVM based project to prove that this is the case first...

解决方案

To make compiling, running and intellisense work in Visual Studio, you need to do the following:

  • Reference saxon9api.dll, as you already did
  • Reference IKVM.OpenJDK.Core.dll
  • Reference IKVM.Runtime.dll (not sure this is needed, but I always include it)

If you are also referencing vjslib, you may run into issues, because it uses a lot of the same namespaces and classnames, leading to ambiguities that can cause Visual Studio's intellisense to get into problems. Perhaps other libraries exist that show the same namespace clashes. In that case, try this on a fresh project first and add the references one by one, starting with Saxon's dependencies first.

After you do this, at least in Visual Studio 2010, 2012 and 2013, you will find that the context-sensitive help is working (image is of VS 2012 with R#):


Note: since this post is old, it may have only applied to Visual Studio 2008 at the time, I have not tested that as I am not using it anyore.

这篇关于在 Visual Studio 中使用 Saxon .NET XSLT 处理器不适用于智能感知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆