В студии проект работает, но после публикации приложение не запускается
Здравствуйте. Написал я программу на базе WPF. В студии, как понятно из заголовка, проект запускается и в режиме дебаг и в режиме релиз. Но стоит мне собрать проект опубликованной версии, так ничего не работает. Я впервые сталкиваюсь с подобной проблемой и совершенно не понимаю в каком направлении мне копать. Я в программу SQLite прикрутил, может там как то надо настраивать соединение с базой? Но это всё домыслы.
Помогите. Жаль потраченного времени.
Не запускается проект WPF после публикации
Здравствуйте. Помогите пожалуйста в такой проблеме. Есть несколько проектов, которые собираются без.
После публикации на хостинг проект не работает, если используется БД
Хостинг parallels panel. Создаю проект asp.net webforms. Подключаю базу данных к проекту.
Win32 приложение не запускается в 2019 студии
Здравствуйте! Возникла такая ситуация, что проект в visual sudio 6 запускается, а в visual sudio.
Приложение из GooglePlay не запускается (из студии все хорошо)
Создал свое первое приложение, при запуске из Android Studio все нормально. И на живом устройстве.
Сообщение от paiiiko
А были времена, когда юзеры программу на дискете переносили, копируя на неё ярлык.
И иногда это даже работало.
Технологии меняются, а незнание остаётся.
| Меню пользователя @ Rius |
| Посетить домашнюю страницу Rius |
| Читать блог |
Сообщение было отмечено paiiiko как решение
Решение
Сообщение от OwenGlendower
Сообщение от paiiiko
да. это помогло. спасибо. но нарисовалась ещё одна проблема. Если создавать установщик программы через Microsoft Visual Studio Installer Projects 2022 то она по прежнему не запускается.
во время сборки проекта выскакивают такие сообщения
Build started.
—— Starting pre-build validation for project ‘SetupDiscarding 2.0’ ——
—— Pre-build validation for project ‘SetupDiscarding 2.0’ completed ——
1>—— Build started: Project: SetupDiscarding 2.0, Configuration: Release ——
Building file ‘D:\Study\C#\задания\SetupDiscarding 2.0\Release\SetupDiscarding 2.0.msi’.
WARNING: File ‘Discarding 2.1.exe’ of project output ‘Publish Items from Discarding 2.1 (Active)’ targeting ‘x64’ is not compatible with the project’s target platform ‘x86’
WARNING: File ‘e_sqlite3.dll’ of project output ‘Publish Items from Discarding 2.1 (Active)’ targeting ‘Unknown’ is not compatible with the project’s target platform ‘x86’
WARNING: File ‘e_sqlite3.dll’ of project output ‘Publish Items from Discarding 2.1 (Active)’ targeting ‘x64’ is not compatible with the project’s target platform ‘x86’
WARNING: File ‘e_sqlite3.dll’ of project output ‘Publish Items from Discarding 2.1 (Active)’ targeting ‘Unknown’ is not compatible with the project’s target platform ‘x86’
Packaging file ‘Microsoft.Extensions.Configuration.UserSecrets.dll’.
Packaging file ‘Microsoft.Data.Sqlite.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘e_sqlite3.a’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.EntityFrameworkCore.Sqlite.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.EntityFrameworkCore.Abstractions.dll’.
Packaging file ‘Newtonsoft.Json.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.Extensions.Caching.Memory.dll’.
Packaging file ‘Microsoft.Extensions.Logging.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Discarding 2.1.deps.json’.
Packaging file ‘Microsoft.Extensions.Configuration.Abstractions.dll’.
Packaging file ‘Microsoft.EntityFrameworkCore.Relational.dll’.
Packaging file ‘libe_sqlite3.dylib’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Discarding 2.1.dll’.
Packaging file ‘Discarding 2.1.runtimeconfig.json’.
Packaging file ‘Microsoft.Extensions.DependencyModel.dll’.
Packaging file ‘icon.ico’.
Packaging file ‘Microsoft.EntityFrameworkCore.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘SQLitePCLRaw.batteries_v2.dll’.
Packaging file ‘Discarding 2.1.exe’.
Packaging file ‘e_sqlite3.dll’.
Packaging file ‘Discarding 2.1.pdb’.
Packaging file ‘Microsoft.Extensions.Caching.Abstractions.dll’.
Packaging file ‘libe_sqlite3.dylib’.
Packaging file ‘Microsoft.Extensions.Logging.Abstractions.dll’.
Packaging file ‘libe_sqlite3.dylib’.
Packaging file ‘e_sqlite3.dll’.
Packaging file ‘e_sqlite3.dll’.
Packaging file ‘Microsoft.Extensions.DependencyInjection.dll’.
Packaging file ‘Microsoft.Extensions.FileProviders.Physical.dll’.
Packaging file ‘Microsoft.Extensions.Primitives.dll’.
Packaging file ‘Microsoft.Extensions.DependencyInjection.Abstractions.dll’.
Packaging file ‘SQLitePCLRaw.provider.e_sqlite3.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.Extensions.Configuration.Json.dll’.
Packaging file ‘libe_sqlite3.dylib’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.Extensions.Options.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.Extensions.FileSystemGlobbing.dll’.
Packaging file ‘libe_sqlite3.so’.
Packaging file ‘Microsoft.Extensions.Configuration.dll’.
Packaging file ‘e_sqlite3.dll’.
Packaging file ‘Microsoft.Extensions.FileProviders.Abstractions.dll’.
Packaging file ‘Microsoft.Extensions.Configuration.FileExtensions.dll’.
Packaging file ‘SQLitePCLRaw.core.dll’.
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Build started at 3:20 AM and took 06,729 seconds ==========
если менять целевую версию проекта на х64, то на Unknown он всё ровно ругается и программа так же не запускается
project can't be opened, visual studio crashing
Last thing I did was add a timer in a user control which updates form color. Now every time I open the project, it loads it up and then says ‘Visual Studio Stopped Working’.
I noticed that Visual Studio ‘runs’ the timer while in designer mode too, so I thought that might be causing the problem so I removed the timer from designer.cs and then renamed all the files Visual Studio was opening, but still it crashes. All the other projects work fine. This is the 4th time that it has happened to me. I’m using Visual Studio 2012 Ultimate. Any suggestions please?
10 Answers 10
It sounds like your solution settings were corrupted when Studio crashed. You can reset them by deleting your solution’s *.suo file:
- Make sure you can view hidden files
- Find your solution in Windows Explorer. It should be a *.sln file
- There should be a hidden *.suo file in the same folder. Delete it.
That will reset all of your solution-specific settings, including the windows you had open.
In the future, you can prevent code from executing in the designer by wrapping it in an if using the Form.DesignMode property (inherited from System.ComponentModel.Component ):
UPDATE for VS 2017 and 2019
In VS 2017 and 2019, the *.suo file has been moved into a .vs folder within the solution directory:
/[Solution Directory]/.vs/[Solution Name]/.suo
You can just delete the entire .vs folder to reset your local settings for that solution.
Disabling Visual Studio extensions fixed it for me
Tools -> Extensions and Updates -> Installed
In my case, Web Essentials was causing the problem
Hope this helps!
If you have a different version of Visual Studio on your computer open that one. Click Debug -> Attach To Process. Select the other Visual Studio process. You should only be able to see one. The Process name is devenv.exe.
Now replicate the problem in the broken VS. It will break on the exception in the unbroken VS.
In my case the exception looked like this
An unhandled exception of type ‘System.TypeLoadException’ occurred in Microsoft.VisualStudio.Platform.VSEditor.dll
Additional information: Method ‘Connect’ in type ‘JetBrains.UI.SrcView.ContextNotifications.ContextNotificationControl’ from assembly ‘JetBrains.Platform.UI, Version=104.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325’ does not have an implementation.
I fixed it by running the Resharper installer and setting the repair option.
Close all the instance of VS 2012. Open VS 2012 in Admin mode (only VS 2012 no solution), then using this instance of VS try to OPEN the project *.sln.
It should open up properly. For me only this solution works nor deleteing *.suo file neither DISABLING the Extentions and Updates.
Hope this helps. Enjoy. What is Stopping You 🙂
Make sure file permissions are consistent. If the bin or obj folders can’t be accessed, Visual Studio may crash. Set file ownership and permissions in file properties -> security -> advanced.
I don’t think there’s a suo file any more in VS 2017.
There is however a hidden .vs folder. Try deleting it, worked for me 🙂
![]()
Clearing my TFS cache worked for me.
- Close all instances of Visual Studio on the client machine
- Manually delete the corresponding TFS client cache folder, and then start Visual Studio
The corresponding TFS folders to manually delete are as follows:
TFS 2017: %localappdata%\Microsoft\Team Foundation\7.0\Cache\
TFS 2015: %localappdata%\Microsoft\Team Foundation\6.0\Cache\
TFS 2013: %localappdata%\Microsoft\Team Foundation\5.0\Cache\
TFS 2012: %localappdata%\Microsoft\Team Foundation\4.0\Cache\
Let me introduce my case when visual studio was crashing when opening a solution but not any solution, only a solution with DevExpress components, other solutions where opening ok until i tried to add a DevExpress component on the form.
The EventViewer indicated the problem has to do with a DevExpress dll. I repaired the DevExpress installation and the problem is fixed. Something broke my DevExpress installation. This only happened once in 20 years i am using their components and i have no idea what caused the problem in the first place.
Having sent that in most cases that i cannot open a single solution i am deleting the .vs folder or the .suo file and the problem is usually fixed. Clearing resharper cache may also help sometimes.
Ошибка при попытке запуска проекта не удается запустить программу visual studio
I’m having problems launching an application with VS2017 on Windows 10. Starting in Debug mode, a popup apperars with the message:
Error while trying to run project: Unable to start program ».
The request is not supported. 
If I launch without debug, it runs. If I run it and then attach to the process, it attaches. If I run with administrative privileges, then it debugs (but I can’t develop with administrative privileges). I’m owner of the folder where is source code and where project is built.
It works like a charm on previous PC with Windows 7.
asked Mar 24, 2017 at 14:44
You need to check «Use Managed Compatibility Mode» in Tools|Options|Debugging|General.
answered Mar 24, 2017 at 14:50
emre kaplan emre kaplan
180 2 silver badges 13 bronze badges
In the end, i found the solution. The problem is ConEmu set in «Aggressive mode» and as default terminal: it capture my application execution and do some unknown interference.
I removed that setting, and my app work like a charm.
answered Dec 10, 2018 at 9:03
446 3 silver badges 14 bronze badges
I discovered this issue in Visual Studio 2017, and I found that excluding my code folders from my virus scanner (MalwareBytes) solved the problem in my case.
answered Jul 9, 2020 at 14:37
31 3 bronze badges
In my case this was the result of my virus software quarantining the executable as «Malware» because I had used a component in it that connected to the internet. Once I listed my project folder as excluded from malware detection everything ran just fine.
answered Sep 30, 2017 at 19:19
This seems to be a catch-all error message, based on the varied answers above. I will add a new one: in my case our IT department a few days earlier deployed new PolicyPak security software which prevented execution of unknown applications. I saw this message ‘Error while trying to run project’ in Visual Studio 2022, and then found it on multiple projects. Since corporate IT didnt share this news with any of us developers ahead of time, I wasted 2 days chasing down the symptoms trying to find an answer. Finally got a response from an IT ticket: «Oh, that must be because of the new security package we deployed this week.» I found it by right-clicking the .exe file and noticed I have a new option, Run Self Elevated.
answered Mar 10 at 14:52
113 1 silver badge 10 bronze badges
Здравствуйте.
Создал новый проект WPF в Студии, покидал нужных виджетов, пытаюсь запустить, получаю ошибку:
Запускаю установщик, выбираю VS17 -> изменить. В сводке указанно (если это важно):
- Включено
- Средства разработки классических приложений
- Средства разработки для .NET 4.6.1
- C# и Visual Basic
- Blend for visual studio
- Инструменты для Entity Framework 6
- Средства профилирования
- Поддержка языка F#
- Средства разработки .NET Core 1.0 — 1.1
Не могли бы вы подсказать, в чем может быть дело?
Попытка переустановить студию приводит к сбою установки со следующей ошибкой (из журнала)
По совету @Eikhner обновил windows, установил проблемный пакет руками, перезагрузился; никакого эффекта. Попробовал восстановить студию, получаю сбой. Единственная ошибка, которую пока удалось вынуть из журнала:
@PashaPash, файл, о котором вы говорите, отсутствует, но есть с таким же именем и расширением .log.html
Система почему-то определилась как виста. Что бы это могло означать?
Сообщение от OwenGlendower
попробуй отключить антивирусы, anti-malware и подобные утилиты.
Сделал. Пишет вот что:
«Вы попали на эту страницу, потому что пытались получить доступ к порталу Microsoft Connect. Спустя почти 10 лет Microsoft Connect был уволен в пользу новых инструментов и услуг, которые позволят вам взаимодействовать с Microsoft. Если вы являетесь участником активной программы Connect, ваша программа либо закрывается, либо перемещается в один из этих инструментов или служб. Определите свою программу ниже, чтобы получить статус и следующие шаги.»
И дальше перечень действующих программ компании… Может смотрю куда-то не туда…Добавлено через 10 минут
))) туплю мал-мала.
Ты, наверняка про запуск проекта же?Я отключал все. бесполезно.
Проблема вылезла когда я начал центральную программулю собирать. А она частично состоит из подобных модулей программ клиентских.В итоге на копипастил на чистую форму заготовок — назвал ее свалкой и решил с нее элементы управления тягать на другие формы.
Потом с нее натаскал элементов на главную форму приложения и куски кода туда же))).И все. Начинание на этом загнулось.
Я уж какие только файлы не перерыл, все надеялся найти — в каком месте «класс не является первым в коде» )))
И даже нашел какой-то, где моя форма-свалка элементов и заготовок была первой. Поменял с главной местами — ноль эмоций…
—————Короче просто Переделал новый проект с нуля. Сделал сперва основную форму, , настроил проект, привязал ссылки, попробовал на запуск, за архивировал полученного зародыша в рар и потом стал копипастить куски с разных форм клиенских программ.
Sorry, you have been blocked
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
Cloudflare Ray ID: 80251205cbc20371 • Your IP: Click to reveal 86.107.21.84 • Performance & security by Cloudflare