Ninject Given Path's format is not supported
- by David Osborn
The Ninject initialization works fine when i run my application directly from VS2010, but if I deploy the application to our custom "plugin" environment I get this error when I run the app and it tries to initialize Ninject.
Error during initialization
The given path's format is not supported.
ERROR : The given path's format is not supported.
Type : NotSupportedException
Location: System.String CanonicalizePath(System.String, Boolean)
Stack Trace:
at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at Ninject.Modules.ModuleLoader.NormalizePath(String path)
at Ninject.Modules.ModuleLoader.GetFilesMatchingPattern(String pattern)
at Ninject.Modules.ModuleLoader.b_0(String pattern)
at System.Linq.Enumerable.d_142.MoveNext()
at System.Linq.Lookup2.Create[TSource](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at System.Linq.GroupedEnumerable3.GetEnumerator()
at Ninject.Modules.ModuleLoader.LoadModules(IEnumerable1 patterns)
at Ninject.KernelBase.Load(IEnumerable`1 filePatterns)
at Ninject.KernelBase..ctor(IComponentContainer components, INinjectSettings settings, INinjectModule[] modules)
at Ninject.KernelBase..ctor(INinjectModule[] modules)
at MyApp.Ioc.ResolveType.Initialize()
at MyApp.Program.Run()