开发者

C# - Using WebChart.dll

Iam developing an application where I try to use WebChart.dll to create charts. I have added a reference to WebChart.开发者_运维知识库dll in my application and where I try to use it it dose not work. I try to import the namespace using WebChart; and get: The type or namespace name 'WebChart' could not be found (are you missing a using derective or and assembly reference


The problem was that WebChart.dll was not compatible with .NET Framework 4.0, changing my application to 3.5 solved the problem.


If your problem was a .Net versioning problem, then the problem is probably that WebChart.dll links to specific versions of .net assemblies.

You can work out what assemblies WebChart.dll links to using a tool like Reflector (free alternatives are available apparently!)

You can override this behavior if you want to by using bindingRedirect in your web.config file - e.g. here's a section I used in an old DNN installation

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

More on bindingRedirect - http://blogs.msdn.com/b/thottams/archive/2007/01/30/introduction-to-versioning-and-bindingredirect.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜