Error loading assembly after renaming path

1

I have a solution with severals projects i use for learning purpose. Recently i added a new class library project. I somehow accidently named it NinjaDomain,Classes instead of the intended NinjaDomain.Classes (dot instead of comma)

Before i realised it i had done som coding in this project and referenced it from other projects.

I renamed the folder manualy to NinjaDomain.Classes which was not a smart thing to do. So i have searched through every proj and the sln file and all the files that can be searchable through Visual Studios advanced find.

I have deleted and readded the references. Ive checked their properties and seen that they point to the correctly spelled path folder. I can build the project without errors at this point and i find no more misspellings but when i try to run the solutions MVC WebApi project i get this error:

Could not load file or assembly 'NinjaDomain\,Classes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'NinjaDomain\,Classes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FileLoadException: Could not load file or assembly 'NinjaDomain\,Classes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent) +0
System.Reflection.RuntimeAssembly.CreateAssemblyName(String assemblyString, Boolean forIntrospection, RuntimeAssembly& assemblyFromResolveEvent) +113
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +33
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +21 System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38

[ConfigurationErrorsException: Could not load file or assembly 'NinjaDomain\,Classes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +726
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +196 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +45
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +172
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +111
System.Web.Compilation.BuildManager.ExecutePreAppStart() +156
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +674

[HttpException (0x80004005): Could not load file or assembly 'NinjaDomain\,Classes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +772
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +195

asp.net
.net
visual-studio
visual-studio-2015
asked on Stack Overflow Apr 21, 2016 by Daarwin • edited Apr 21, 2016 by Daarwin

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0