开发者

TinyMCE .NET dll could not be found

I am trying to include the .Net TinyMCE dll in my project. The code I am using is:

<%@ Register Assembly="Moxiecode.TinyMCE" Namespace="Moxiecode.TinyMCE.Web" tagprefix="tinymce" %>

I have already added the dll to the references in the project and I checked the code in my csproj to make sure it is correct. I modified it to make sure it had a path hint.

<Reference Include="Moxiecode.TinyMCE, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
  <HintPath>bin\Moxiecode.TinyMCE.dll</HintPath>
  <SpecificVersion>False</SpecificVersion>
</Reference>

When I try to build my project I receive the error message:

Could not load file or assembly 'file:///C:[ProjectPath]\bin\Moxiecode.TinyMCE.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

How to I resolve this error? I have tried opening and closing VS2010. Adding and dropping the reference. Nothing has worked.


After more research it appears the issue is that 开发者_运维百科I am using .Net 4.0 and TinyMCE's .Net dll does not have a Strong Name. Basically, it does not have a PublicKeyToken. How do I resolve this?


I'm not sure if this will solve the problem but for your hint path to be relative, I believe you need to start it with .\ (or ..\ for parent)

Where is the actual path to the DLL? Have you tried setting the build output level to Diagnostic (Tools -> Options... -> Projects and Solutions -> Build and Run)

Does that give you any more information?

For testing purposes, try creating a C:\Bin\Moxiecode and place the DLL in it. Does this fix the issue? (in which case it's a path problem). If not, it may be something else which is throwing a misleading exception (corrupt dll or similar?). [Edit: The path mentioned in this para was correct before the Q was edited]

Update: If you have a project being compiled with a strong name, all your references must have one also. This is to ensure that your code doesn't have something malicious injected into it. Your only options are:

  • Don't strongly sign your project [Bad]
  • Recompile the offending DLL yourself with an SNK [Good if you can get the source]
  • Get the developers of the DLL to build you one with an SNK [Good if you can get it to happen]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜