简体   繁体   中英

Adding Class Library Reference to WCF Service Library

I'm working on my first web service, and I'm having trouble referencing another class library I have in my solution inside of my web service. Here is that service:

using MyDomain;

namespace WebServices
{
    public class AutomatedLogin : IAutomatedLogin
    {
        public Guid GetToken(string email)
        {
            //Code goes here
        }
    }
}

When I add a reference to MyDomain inside my WCF Service Library, intellisense recognizes the reference, but when I rebuild my solution, the compiler throws the following error:

The type or namespace name 'MyDomain' could not be found (are you missing a using directive or an assembly reference?)

Can anyone tell me why the compiler is ignoring the MyDomain reference when I try to rebuild my solution?

I was able to find a similar question: WCF service library project can't find reference to other project

I changed the project's target framework from .NET Framework 4 Client Profile to .NET Framework 4 which seems to have fixed the compiling issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM