William Hodges
William Hodges

Reputation: 681

WPF not recognizing custom Class Library

I have built a class library and for some reason when I put it in the Using Molo.Core.Reference at the top of the C# file, I still have to type the entire path vs typing just Reference.{public} in the code. See example below.

using NLog;
using Molo.Core.Reference;
using System;

...

Process.Start(Molo.Core.Reference.Ground.logSite);
log.Info("Started " + content + ". It will be started externally.");

In VS2015 the Molo.Core.Reference is greyed out like it's not being used. When I type Reference it will not appear in the Inteli-sense. The only thing that appears is when I type Molo

Upvotes: 2

Views: 109

Answers (1)

teynon
teynon

Reputation: 8328

It sounds like you have a namespace conflict. You have two namespaces that have the same name. Or some sub-namespace is conflicting with another one. You can use an alias with your using to avoid the conflict. Then reference your library from the alias.

using myAlias = Molo.Core.Reference;
// ....
myAlias.Ground.logSite;

Upvotes: 3

Related Questions