Base solution for your next web application
Open Closed

abp and webapi help page error #1731


User avatar
0
heifengwll created

vs2013、Windows7 1、select Multi Page Web Application download

2、nuget Microsoft.AspNet.WebApi.HelpPage

3、when view WebApi action Description ,like: <a class="postlink" href="http://localhost:61759/Help/Api/GET-api-MyTestWebApi-GetString">http://localhost:61759/Help/Api/GET-api ... -GetString</a>

4、dubug : at Areas\HelpPage\Views\Help\DisplayTemplatesHelpPageApiModel.cshtml Samples error: D:\ project \MyWeb\MyWeb.Web\Areas\HelpPage\Views\Help\DisplayTemplates\Samples.cshtml (6): error CS0012: Type "System.Collections.Generic.Dictionary'2 <T0,T1>" defined in the Assembly that is not referenced. You must add the assemblies "System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" reference.

but If you set up a separate project, you do not have this error。

Anyone encountered this problem? Can anyone help me find the cause of the problem Thank you ~ ~


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Which version of ABP do you use ? Probably some assemblies depend on different versions of System.Collections. Adding a assembly redirect to web.config might solve your problem.

  • User Avatar
    0
    heifengwll created

    Abp.0.12.0.2

    I'll try this method Thank you ~ ~

  • User Avatar
    0
    heifengwll created

    <cite>ismcagdas: </cite> Which version of ABP do you use ? Probably some assemblies depend on different versions of System.Collections. Adding a assembly redirect to web.config might solve your problem.

    Thank you, ~~, have been resolved In my Web.config, node <system.web> <assemblies>, adding <add assembly="System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

  • User Avatar
    0
    heifengwll created

    Or maybe like <system.web>

    &lt;globalization culture=&quot;auto&quot; uiCulture=&quot;auto&quot;/&gt;
    &lt;compilation debug=&quot;true&quot; targetFramework=&quot;4.5.2&quot;&gt;
      &lt;assemblies&gt;
        &lt;add assembly=&quot;System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; /&gt;
        &lt;add assembly=&quot;System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; /&gt;
      &lt;/assemblies&gt;
    &lt;/compilation&gt;
    
    &lt;httpRuntime/&gt;
    &lt;customErrors mode=&quot;Off&quot;/&gt;
    &lt;pages controlRenderingCompatibilityVersion=&quot;4.0&quot;/&gt;
    

    </system.web>

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks for sharing your solution.