Unresolved assembly reference with sandcastle

一笑奈何 提交于 2019-12-05 17:50:43

问题


I am trying to generate documentation with sandcastle help file builder. While building the project in the sandcastle i am getting the following error.

MRefBuilder : error : Unresolved assembly reference: Microsoft.Owin (Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) required by Microsoft.AspNet.Identity.Owin [C:\Users\inkosah\Documents\Help\Working\GenerateRefInfo.proj]
Last step completed in 00:01:19.4610

Can anybody help me to resolve this issue? I also tried adding it separately to project references in the sandcastle but no help.


回答1:


Solution 1 : Add missing references to a dummy project.

  1. Create 'dummyProject' (ie class library)
  2. In Visual Studio - Package Manager Console

    Install-Package Microsoft.Owin -Version 2.1.0.0 -ProjectName dummyProject

    Install-Package Microsoft.Owin.Security.OAuth -version 2.1.0.0 -ProjectName dummyProject

  3. In Sandcastle Help Fil Builder - Project Explore, add two references

    Microsoft.aspNet.identity.Owin (dll found in ..\packages\Microsoft.AspNet.Identity.Owin.2.2.0\lib\net45)

    Microsoft.Owin (dll found in ..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll)

It looks like MRefBuilder found that Microsoft.AspNet.Identity.Owin relies on Microsoft.Owin (== v 2.1.0) and not Microsoft.Owin (>= 2.1.0).

The main project is still using Microsoft.Owin 3.0.1.0

Solution 2 : Ignore unresolved references

In Documentation (or SHFB) Project Properties / Plug-Ins :

  1. Add "Assembly Binding Redirection" in "Plugs-Ins in This Project"
  2. configure it to "ignore if Unresolved" "Microsoft.Owin" and "Microsoft.Owin.Security.OAuth"


来源:https://stackoverflow.com/questions/29204603/unresolved-assembly-reference-with-sandcastle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!