我创建一个类库Buybuy,但命名空间和另一个类库保持一致都用namespace shop.Commodities.ComponentsProductDetails.cs在shop下,
<%@ Register TagPrefix="shop" Namespace="shop.Web.Components" Assembly="shop.Web.Components" %>
<shop:ProductDetails id="ProductDetails" runat="server"></shop:ProductDetails>
这样可以用,没问题ShopProductDetails.cs在Buybuy下
<%@ Register TagPrefix="shop" Namespace="shop.Web.Components" Assembly="shop.Web.Components" %>
<shop:ShopProductDetails id="ShopProductDetails" runat="server"></shop:ShopProductDetails>
出错说ShopProductDetails 不存在
编译通过没问题的,可能是哪里的问题哦

解决方案 »

  1.   

    ProductDetails.cs在shop下,
    <%@ Register TagPrefix="shop" Namespace="shop.Web.Components" Assembly="shop.Web.Components" %>
    <shop:ProductDetails id="ShopProductDetails" runat="server"></shop:ProductDetails>
    这样可以用,没问题ShopProductDetails.cs在Buybuy下
    <%@ Register TagPrefix="shop" Namespace="shop.Web.Components" Assembly="shop.Web.Components" %>
    <shop:ShopProductDetails id="ShopProductDetails" runat="server"></shop:ShopProductDetails>
    这样试试!  我也不大懂哦 之前有做过