You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TinyMCE Wiris插件本地正常服务器报CS0433错误求助

Fixing CS0433 Duplicate Type Error with Wiris Plugin on Server

The error you're hitting is a classic assembly conflict issue: two distinct DLLs (WIRISplugin.DLL and pluginwiris.DLL) both contain the com.wiris.plugin.factory.PluginBuilderFactory type, which confuses ASP.NET's assembly loader. This often pops up after deployment because local environments tend to have cleaner dependency setups, while servers can accumulate old or duplicate files over time. Let's walk through the fixes step by step:

1. Clear Cached Temporary ASP.NET Files on the Server

First, let's eliminate the stale assemblies mentioned in the error message. On your server:

  • Open Command Prompt as Administrator
  • Run these commands to clear the cached files for your .NET framework version:
    cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
    rd /s /q public
    

This forces ASP.NET to load fresh copies of your application's assemblies from the bin folder instead of using cached duplicates.

2. Audit Your Local Project's Dependencies

Head back to your development project and check for conflicting references:

  • Project References: Look for both WIRISplugin and pluginwiris in your project's references list. If both are present, remove one (stick with the official, up-to-date version provided by Wiris).
  • NuGet Packages: If you installed Wiris via NuGet, ensure you don't also have a manual DLL reference to the other version. Uninstall any conflicting NuGet packages if necessary.

3. Clean Up the Server's Bin Directory

Connect to your server's application folder and navigate to the bin directory. Delete either WIRISplugin.DLL or pluginwiris.DLL—only keep one consistent version. Double-check that no old, leftover versions are lingering from previous deployments.

4. Add an Assembly Binding Redirect (If Needed)

If cleaning up doesn't resolve the issue, you can explicitly tell ASP.NET which assembly to prioritize. Add this snippet to your web.config under the <configuration> section:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="WIRISplugin" publicKeyToken="YOUR_PUBLIC_KEY" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-XX.XX.XX.XX" newVersion="XX.XX.XX.XX" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

Replace YOUR_PUBLIC_KEY and XX.XX.XX.XX with the actual public key and version number of the DLL you want to keep. You can find these details by right-clicking the DLL in your project, selecting Properties, and checking the "Details" tab.

5. Verify Your Deployment Process

If you're using automated deployment (like CI/CD pipelines, FTP scripts, or Visual Studio publish), make sure it's not copying both DLLs to the server. Check your publish profiles or deployment scripts to exclude the redundant DLL from being deployed.

After completing these steps, restart your IIS site or application pool to ensure all changes take effect. This should resolve the duplicate type conflict.

内容的提问来源于stack exchange,提问作者Fadl Assaad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 20:48:13