Problem migrating asp .net 3.5 vs2010 solution to vs 2017 solution

  • Thread starter Thread starter rgelfand
  • Start date Start date
R

rgelfand

Guest
I have installed both vs 2010 and vs 2017 on windows 7 32 bit.

I was able to build the entire on vs 2017.

However, when running the application in debug mode, I get the error, below. The 'ProjAppMod.XmlSerializers' dll was generated ( via generate serializer assembly set on in project) by another project in the solution which builds ProjAppMod.dll. I checked the version of all dlls and they are .net version v2.0.50727. All the projects are .net version 3.5. No issues when running on the same machine using vs 2010.


There is something else I found bizzare... if I rename ProjAppMod.XmlSerializers.dll to ProjAppMod.XmlSerializers.dll.src (in web application project which uses this dll) and do debug in vs 2017, it works.

Any help is appeciated. Thanks in advance.





Could not load file or assembly 'ProjAppMod.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
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.BadImageFormatException: Could not load file or assembly 'ProjAppMod.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'ProjAppMod.XmlSerializers' could not be loaded.


=== Pre-bind state information ===
LOG: User = dom\romang
LOG: DisplayName = ProjAppMod.XmlSerializers
(Partial)
LOG: Appbase = file:///C:/Users/romang/Source/Repos/weba/ProjWebSvc/
LOG: Initial PrivatePath = C:\Users\romang\Source\Repos\weba\ProjWebSvc\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\romang\Source\Repos\weba\ProjWebSvc\web.config
LOG: Using host configuration file: C:\Users\romang\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/romang/AppData/Local/Temp/Temporary ASP.NET Files/ProjWebSvc/b25fb8bc/4f861caa/ProjAppMod.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Users/romang/AppData/Local/Temp/Temporary ASP.NET Files/ProjWebSvc/b25fb8bc/4f861caa/ProjAppMod.XmlSerializers/ProjAppMod.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Users/romang/Source/Repos/weba/ProjWebSvc/bin/ProjAppMod.XmlSerializers.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.



Stack Trace:


[BadImageFormatException: Could not load file or assembly 'ProjAppMod.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'ProjAppMod.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337

[HttpException (0x80004005): Could not load file or assembly 'ProjAppMod.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Could not load file or assembly 'ProjAppMod.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9002803
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333

Continue reading...
 
Back
Top