Я уже некоторое время работаю над веб-приложением VB.net, и я случайно переключил «Приложение Тип "из библиотеки классов в приложение Windows Form. Я пытался построить, это не удалось, но когда я переключился обратно, программа больше не будет выполняться, выводится ошибка:Невозможно запустить программу C: ... ****. Dll Приложение VB.net Visual Studio 2015
Unable to start program 'C:\Users\User\...\bin\Project.dll'
'C:\Users\User\...\bin\Project.dll' is not a valid Win32 application.
До этого приложение будет строить хорошо. Кроме того, на странице свойств для проекта, в разделе «Web» отображается сообщение об ошибке:
An error occurred trying to load the page.
Value does not fall within the expected range.
Выход сборки не дает ключи к неожиданному поведению, он строит хорошо, он просто не будет работать. Код также полностью функциональный.
Я попытался перезапустить несколько раз, удалив каталог/bin и разрешив его с нуля (после этого восстановить старое содержимое, когда это не удалось), установив проект запуска, изменив целевой процессор и режим отладки/выпуска. Я попробовал как сборку ReSharper, так и сборку Visual Studio. Я также попытался создать конфигурацию сборки, которая нацелилась на «C: \ Users \ User ... \ bin \ Project.vshost.exe», но это немедленно завершится. У меня нет возможности установить «Startup Object» на странице приложения параметров проекта, но это никогда не было проблемой. Мне никогда не приходилось ориентироваться на EXE для запуска моего приложения раньше. Если я попробую другие типы приложений, в нем указано, что «Sub Main не найден в проекте».
Я не могу воссоздать проект из-за его размера, поэтому ему понравилось бы, если бы кто-нибудь мог предложить некоторое представление, в следующий раз я буду помнить, что не буду играть с настройками IDE.
======= ======= ОБНОВЛЕНО
Так что я установил "не истечение", изменив WebProjectProperties на:
<UseIIS>True</UseIIS>
<UseCustomServer>False</UseCustomServer>
<servers defaultServer="">
Но теперь, когда Я запустить программу, появляется следующее сообщение об ошибке:
Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Стек трассировки и детали:
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.VisualStudio.QualityTools.UnitTestFramework (2) | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/User/Source/Repos/Findem/IfitConsulting/
LOG: Initial PrivatePath = C:\Users\User\Source\Repos\Findem\IfitConsulting\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\User\Source\Repos\Findem\IfitConsulting\web.config
LOG: Using host configuration file: C:\Users\User\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/0ef61219/b7128029/Microsoft.VisualStudio.QualityTools.UnitTestFramework (2).DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/0ef61219/b7128029/Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)/Microsoft.VisualStudio.QualityTools.UnitTestFramework (2).DLL.
LOG: Attempting download of new URL file:///C:/Users/User/Source/Repos/Findem/IfitConsulting/bin/Microsoft.VisualStudio.QualityTools.UnitTestFramework (2).DLL.
WRN: Comparing the assembly name resulted in the mismatch: NAME
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Стек след
[FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
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 'Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +738
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +217
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +92
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +290
System.Web.Compilation.BuildManager.ExecutePreAppStart() +157
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +531
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework (2)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947380
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261