The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) - Visual Studio 2017

1

I have ordinary ASP.NET project with .NET Framework 4.5.2, It work great as Web Site Projects (WSP), but I try to change this project to Web Application Projects (WAP). I don't change anything in body of project code, I only add designer with definition of control and add default namespace needed to WSP project. But aspnet_compiler crashed with message below (this is a part of MSBuild process):

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p E:\Projects\Arenda_5\MyArenda\ArendaNew\obj\Debug\AspnetCompileMerge\Source -d E:\Projects\Arenda_5\MyArenda\ArendaNew\obj\Debug\AspnetCompileMerge\TempBuildDir -errorstack

Microsoft (R) ASP.NET Compilation Tool version 4.8.3752.0 Utility to precompile an ASP.NET application Copyright (C) Microsoft Corporation. All rights reserved. (0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: ArendaNew, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.

E:\Projects\Arenda_5\MyArenda\ArendaNew\obj\Debug\AspnetCompileMerge\Source\global.asax(41): warning BC42025: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated

....

E:\Projects\Arenda_5\MyArenda\ArendaNew\obj\Debug\AspnetCompileMerge\Source\My_Saved.ashx(43): warning BC42025: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.

error ASPPARSE: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

error ASPPARSE: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

error ASPPARSE: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

error ASPPARSE: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

error ASPPARSE: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

error ASPPARSE: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

[FileLoadException]: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent) at System.Reflection.AssemblyName..ctor(String assemblyName) at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail) at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail) at System.Web.UI.TemplateParser.AddAssemblyDependency(String assemblyName, Boolean addDependentAssemblies) at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistrationCore(TagNamespaceRegisterEntry nsRegisterEntry) at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(ArrayList nsRegisterEntries)

[HttpParseException]: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(ArrayList nsRegisterEntries) at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(TagNamespaceRegisterEntry nsRegisterEntry) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)

[HttpParseException]: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.WebDirectoryBatchCompiler.CompileNonDependentBuildProviders(ICollection buildProviders)

[HttpParseException]: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Web.Compilation.WebDirectoryBatchCompiler.Process() at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel) at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir, IEnumerable1 excludedVirtualPaths) at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir, IEnumerable1 excludedVirtualPaths) at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback, IEnumerable1 excludedVirtualPaths) at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List1 excludedVirtualPaths) at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths) at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback, Boolean forceCleanBuild) at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback) at System.Web.Compilation.Precompiler.Main(String[] args)

asp.net
.net
vb.net
aspnet-compiler
visual-studio-2017-build-tools
asked on Stack Overflow Mar 15, 2020 by Viacheslav

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0