开发者

Trouble loading project references during build within wpf user control library

开发者 https://www.devze.com 2023-04-07 02:07 出处:网络
As an example of a build time assembly load issue, consider the followingclass library code: using System;

As an example of a build time assembly load issue, consider the following class library code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

namespace ClassLibrary1
{
    public class Class1
    {
        SqlDatabase database;
    }
}

And the following class code in a wpf user control library:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassLibrary1;

namespace WpfControlLibrary1
{
    class Class1
    {
    }
}

The WpfControlLibrary1 has a projec开发者_如何学编程t reference to ClassLibrary1, but using ClassLibrary1; reference fails. A different project type can load ClassLibrary1 just fine, and if the Enterprise Library 5.0 SqlDatabase declaration is commented out, the wpf library can load ClassLibrary1.

Any ideas on what this issue is or how to track it down?

Thanks!


One possible cause is that WpfControlLibrary1 is targeting .NET Client Profile, but one of the other libraries (e.g. Enterprise Library) is targeting the full profile. You can check the "Target framework" setting in the project properties dialog, in the "Application" tab.

You can see more details about the .NET Client Profile at http://msdn.microsoft.com/en-us/library/cc656912.aspx, or about changing the target at http://msdn.microsoft.com/en-us/library/bb398202.aspx.

0

精彩评论

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