2
我已经构建了一个类库,并且由于某种原因,当我将它放在C#文件顶部的Using Molo.Core.Reference
中时,我仍然需要键入整个路径,而在代码中只输入Reference.{public}
。见下面的例子。WPF不识别自定义类库
using NLog;
using Molo.Core.Reference;
using System;
...
Process.Start(Molo.Core.Reference.Ground.logSite);
log.Info("Started " + content + ". It will be started externally.");
在VS2015的Molo.Core.Reference是灰色的像它没有被使用。当我输入Reference
时,它不会出现在Inteli-sense中。唯一出现的是当我输入Molo
我相信包括'Molo.Core.Reference'意味着你可以使用里面包含的内容。 IE'Ground.logSite'而不是'Reference.Ground.logSite' – teynon
拉动'Ground.logSite'拉出另一个文件夹,标记为'Ground',它在项目中。我应该重命名.dll文件夹名称吗? –
听起来就像你有名字空间冲突那么。也许你可以使用别名?我从来没有使用它,但据说,它是'使用myAlias = Molo.Core.Reference' – teynon