Assembly Initialization method :System.NullReferenceException: System.NullReferenceException
Hi All,
I have a Team Project with various Test cases in it. When I try to run these test cases I am getting the following error:
Assembly Initialization method PcsFwTestProject.AssemblyTestLoad.MyAssemblyInitialize threw exception. System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.. Aborting test execution.
I am getting this error at this piece of code in my program:
#region
Additional test attributes[AssemblyInitialize()]
publicstaticvoid MyAssemblyInitialize(TestContext testContext)
{
AppDomain ad =AppDomain.CurrentDomain;//.AppendPrivatePath =
try{
ServiceManager.Services.AddService(newMessageService());ServiceManager.Services.AddService(newResourceService());ServiceManager.Services.AddService(newIconService());ServiceManager.Services.InitializeServicesSubsystem("/Workspace/Services");}
catch (Exception e){throw e;}}
#endregion
Can someone suggest why I am getting this error? Am I missing some dll or initialization of some variable? I appreciate a response in this regard.
Thanks

