I am using Visual Studio 2013 in my project (Asp.net 4.5.1). I used NuGet to add StructureMap on my project.
The Structure of my Solution is:
- MyProjectWeb (Created first)
- MyProjectCore (add second to Solution)
- MyProjectWebTest (added third to Solution)
- MyProjectCoreTest (added forth to Solution)
Then, I just added StructureMap, created Database folder in MyProjectCore
andbelow the DataBase Folder create Impt.
Also, I added the following classes (in code example the classes appear to be in the same file but in reality they are in separate files)
using System.Collections.Generic;
using System.Ling;
using System.Data.Lina;
using StructureMap;
namespace MyProject.MyProject.DataAccess.Impl
{
[Pluggable("Default")]
public class MyClass : IMyClass
{
// Code Goes Here
}
}
namespace MyProject.MyProject.Core.DataAccess
{
[PluginFamily("Default")]
public interface IMyClass
{
// Code goes here
}
}
I get the dreaded type or namespace cannot be found for both Pluggable and PluginFamily.
What am I missing here?
Note: Have done tons of research on this and can not seem to find a clear solution. For Clearity this is a webapp project I am trying to recreate and old webapp project to get and understanding of the underlying architecture so I can migrate to an MVC platform. any Help will be appreciated thanks in advance Kevin
Have you ensured that the project is setup to scan the assembly for attributes?
Failing that, is there any particular reason you're using attributes over say a Registry DSL ?