I have developed a windows application using C# VS 2010. It was working perfectly fine untill I added another project for making a setup.exe to be distributed. But now when I try to run my project it gives error "Could not find file 'obj\x86\Debug\projectname.exe'." and asks if I would like to continue and run the last successful build? If I choose yes it runs a previouse version of application and don't show latest functions and interface changes which I made. Now setup project has been removed and there is single project in solution but still getting same error. I checked debug folder and there is no file named as projectname.exe.
NOTE : Projectname is name of my project
Well Avast antivirus was a problem. I don't know how but I turned off avast and build my application and it worked just fine. ... not a big proble .. sighhhhhhhh
Related
I have created a C# 4.0 WinForms application using Visual Studio 2010 Premium SP1 on Windows 10.
Over the months I have modified and deployed this same App many times, using ClickOnce.
I have never had any difficulty until today.
I made one small modification to the code, which works successfully.
However, after building, and attempting to publish, 2-separate errors are thrown, as listed below.
#1) Cannot publish because a project failed to build.
#2) An error occurred while signing: The parameter is incorrect.
My application does contain a separate project, which is only a Splash Screen project.
If I go to Solution Explorer and attempt to build the 2nd project, it builds fine.
I have also tried to Build > Publish by using the menu in Solution Explorer, rather than from the Publish pane of VS.
Not only is it puzzling why a publish is failing suddenly now, but the error messages do not provide any clue as to where in the code a problem is arising, if indeed it's in the code.
Can anyone suggest how to correct this situation, as I am unable to publish my app any longer.
This error was puzzling, as I've used ClickOnce to deploy modified versions of my App many times. On a hunch, I decided to change the TimeStamp server from the following:
http://timestamp.globalsign.com/scripts/timstamp.dll
to this:
http://timestamp.globalsign.com/?signature=sha2
Since researching this error referenced the fact that Microsoft would no longer recognize SHA1, but needed the SHA2 cryptography, I tried using this latter server and after compiling, it allowed my app to do a successful publish.
If anyone else runs into this problem, the above solution may prove useful.
I have a Setup Project for my winforms application. After installing the application using the generated .msi i navigate to the installation folder and try to run the .exe file and nothing happens. I don't get an error or anything.
Steps i've tried to solve my problem.
Making sure the target platform x86 matches in the main project, setup project and every other project in the solution that the application has a dependency on.
In the setup project, made sure that i have a project output in the application folder that references the primary output from the main project. And that the dlls i use also are listed there.
Ran the application as administrator.
Activated Click Once security settings in the main project.
Ran sfc /scannow without finding any issues.
Restarted my computer.
When installing the program using the generated .msi on another computer i have the same issue.
When running the program from visual studion it works perfectly fine.
It is likely that your application is crashing because of some missing dependency.
Possible reasons:
A missing assembly (say, for eg, is all your third party dependencies present in the application folder after the installation ?)
Difference between .Net framework versions between your machine and the installed machine (say, for eg. 4.7 vs 4.7.2)
One useful tool that has helped us in the past is to use the Windows Event Viewer. If the program is indeed crashing, it is likely to have details about the reason for crash.
You can then use it as a starting point for further investigation.
I'm using CefSharp in my WPF application. Executing it from the Debug folder, and copying the entire folder to target machine works flawlessly.
I made a setup project and selected to copy Primary output, but after installing the app crashes upon start.
After copying individual files from debug to installation folder I discovered that these files are the one missing which make the app crash:
cef.pak
cef_100_percent.pak
cef_200_percent.pak
cef_extensions.pak
I guess these are related to CefSharp but I don't understand why they aren't installed.
Which is the proper way to fix this issue?
Found the list of requirement for CefSharp in Setup Project, I just need to add them manually.
https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)
My app does not run on "Release x86" when running the app it crashes immediately after the splash screen. Output shows the following exception:
The program '[8204] dfz.exe' has exited with code -1073741515 (0xc0000135) 'A dependent DLL was not found'.
It also tells me the module is build without symbols, however in build settings I have set debug info to Full.
The first time I build the app for the Windows Store it built correctly and I also published that version to the store. When I did a manual rebuild to check if ads where inserted correctly it would not run.
However, I can run the app on ARM and X64 with no problems on release. Only x86 with .Net native toolchain will throw the missing dependant DLL.
What I have tried so far:
Created a new project, Added all my files and Nuget packages, No dice
Removed and updated all my existing references.
Tried to debug the release version so i can find out what DLL is missing from the package. However it keeps telling me there are no symbol files.
I am looking for any suggestions I can try because I am really at a loss here of why it will not run on x86.
Edit:
A blank UWP project also returns the DLL error when i run it. It looks like i have a broken development environment.
Edit2:
Just did a remote debugging session to another laptop and the app worked with no problems. So the problem is an environment related issue.
Could one of the projects in your dependencies be configured specifically for x64?
Another thing to check is that one of your projects is not set to build for that configuration (I vaguely remember some problem I had years ago that sounds kind like your situation ... although not for windows store apps ... and it turned out one of my projects wasn't set to compile for the configuration I was selecting ).
I have a Click Once application (WPF) in C#. Initially when I would hit F5 to debug/launch the application it worked smoothly. Eventually, F5 only would build the solution and not launch the application (therefore I could not step through my code). For a short while I switched from Debug to Release mode and for some reason that allowed the application to launch after using F5 and I could step through my code again. But now that no longer works either. Long story short, I cannot get the application to run in a manner that allows me to step through the code. I can only do a Start without Debugging (Ctrl + F5). Obviously this doesn't do much for me other than tell me if the application works or not.
The thing that worked for me today was to open Task Manager and look for any debug programs that didn't terminate properly.
Task Manager > Processes > kill all programs "*.vshost.exe *32"
You probably have lost your start up project in the solution, or the start up project is messed up, and no correct "item" is defined for the startup.
Right click on one of your projects, and select : define as startup project.
Then retry that should do the trick. If not, check in that projects properties to see if a form or something is defined as the startup object for that project.
Edit : Obviously dont define a class library project as startup project, but choose your UI :).
I had this same issue today and came here looking for help. I tried all the suggestions here and nothing helped.
Seeing as my solution was a simple console application I recreated it from scratch. The new solution didn't exhibit the problems, so I started comparing the two.
I reset the solution and project files so that they were identical (apart from Project GUID, name and root namespace) but the first solution still didn't run.
I then tried deleting the suo files, and the bin and obj folders. Still the first solution wouldn't run.
Finally, I noticed the vshost.exe process was still running for the project. When I killed that and reloaded, it all started working correctly.
I just had this problem today. The solution turned out to be a slight twist on the issue with *.vshost.exe mentioned previously.
I could build the application just fine but msvs refused to launch it. I could manually launch the application and the time stamp on the file indicated that it was in fact a fresh build as well. *.vshost.exe wasn't showing up in the task manager, so I couldn't end the process as suggested.
When all else failed, I tried deleting the .exe's and found that *.vshost.exe would not delete because it was in use. The error message indicated that it was actually the steam client (third party software) that had somehow grabbed my *.vshost.exe file and was "using" it. Not sure how or why. At any rate, I completely shut down steam, then it let me delete *.vshost.exe. After that, building and running from msvc worked normally.
Had the same issue, eventually tried deleting all breakpoints and the debug started working again. Yet to figure out why, but at least it works.
As well as the ghost *.vshost.exe. It could also be that you have the same Solution/Project open in another version of VS. I had the same Solution open in both VS2010 and VS2015 and when running in VS2010 it compiled but failed to start. Closing the VS2015 Solution and it ran as expected.
After years of using VS 2008, I suddenly had the F5 problem not launching the application. There must be a dozen different suggestions out there - I tried a few. Someone suggested a virus. My Microsoft Security Essentials was not automatically updating (a common problem it seems), so I manually updated it. It found a virus, removed it, and the F5 problem went away !
Had this problem and tried to delete everything in bin/debug folder but could not delete vshost.exe file - kept requesting admin permission and then still could not remove it even though running from admin account. Restarted and file was gone and f5 worked again