could you tell me why this happens when I simply press F5 in order to start debugging? VS is freshly installed and can't run hello world program :(
I checked for c# console application and that module works, only problem is when choosing C++
here is the screenshot..
http://s50.radikal.ru/i129/1310/c5/ee67bc538bec.png
First, i would recommend to Clean the project and choose Rebuild.
If the problem is still there, you need to check the exe location, and try to execute it manually.
I would say that the error is likely to come from some changes you did (project configuration) that require you to clean the solution, but it is just a mere guess.
Related
I have this C++ project I am trying to debug in Visual Studio (Community) 2015. The build is always successful, but after that debugging never starts. All that shows up is the Windows loading icon, which just never goes away. Any ideas about what might be wrong?
The problem was that Avast was interfering with my Visual Studio Projects. I used the instructions at https://forum.avast.com/index.php?topic=139935.0 to get it to work.
Basically you need to exclude your VS projects from Avast's scan.
... but simply turning off DeepScreen in Avast 2014 is not enough. I
make multiple apps in Visual STudio 2012, and I can tell you that even
with Deep Screen off, Avast will still pop right up and destroy the
compiling process by saying the .exe is a virus (the crazy "evo-gen
[susp]"). The only way I can get Avast to stop doing that is to
manually enter-in exclusion directories for every directory where I
create apps! ...or make an exclusion for some high-level folder.
Try resetting your settings by going here
Tools >> Import and Export Settings Wizard >> Reset all settings
I had similar problems for Visual Studio 2015 Update 1 on Windows 10.
For me, the only solution, which helped is to install this package:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=49029
"FIX: Devenv.com process freezes after you execute devenv.com /build command in Visual Studio 2015 " https://support.microsoft.com/en-us/kb/3092422
I've a C++ project in Visual Studio 2012 Express, and I started having problems lately. When I compile the project it works, nothing wrong, however when I try to execute it the .exe disappears. I mean, I compile the project, the project generates the exe file with no problems, but if I try to execute it from Visual Studio or directly from the output directory, Windows say to me:
Cannot start the program 'C:\Users\Adrian\Dropbox\MyApp\Debug\MyApp.exe'.
The system can not find the file specified
If I create another project, Hello World for example, there is no problem and the exe generates and executes good. So I guess the problem is specific to my project. I tried disabling Avast (because maybe he delete the file) and the problem persists.
Also I create another project, including the files and... the problem is still here...
I check the project options, specifically general and debug options and I see nothing wrong.
So does anyone have an idea what may be wrong?
The output directory is $(SolutionDir)$(Configuration)\ and I'm compiling in Debug mode.
The windows error message is misleading. It should state that, loading a library (dll) failed. You might run the program with a process monitor (see: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)
Ok , so i created a program using VC++ 2010. it ran just fine.
Got to work and could only install vc++ 8 due to having a crappy computer that is still stuck on xp sp2...
Everything will link up and build with no errors, But when the program starts to run i get "This application has failed to start because MSVCR100D.dll was not found"
I tried changing the runtime libary from MDd to MTd but still no luck...any idea?
That DLL comes with Visual Studio 2010. If you want to use your program, you'll somehow have to get your hands on it. If possible at your work, you can download it. Another (probably better) option would be to take it with you from home on a USB drive.
Edit: You can also try re-creating the project, and then copying the source code over into the new project. Your newly created project (in Visual Studio 2008) should not be depending on that erroneous DLL.
Edit 2: As Hans Passant added in a comment, this DLL is needed by Debug compilations of your program. So if you simply compile as Release, you can safely ignore the first part of my post. (I hope I'm not breaking gentleman rules by adding this to my post.)
MSVCR100D.dll is for debug mode, and is installed with visual studio 2010, since 2008 has MSVCR80D. You can just google that and download it, and put it in the same direcrory, or just complie in release mode.
here is a download link. You need the small download zip file button, not the big ones.
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
As I know, MSVCR100D is debug version of runtime library used by VC2010。So, if your point either is:
(1) you do not have that dll which you really need, you can download at http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d or
(2) you want to run that program without requirement of MSVCR100/D.dll, you may need to recreate a project in VC8, then substitute with your source files (not solution file or other files managed by Vistual Studio).
FYI: If my memory were not going wrong, I remember that a project created by higher version of VS cannot be opened directly by lower version one. So, how did you build them?
I've developed a c++ program using Visual Studio 2010 and it works perfectly, but while trying to start it with the .exe file created in the debug folder instead of inside the VS2010, it crashes. It updates my DB once, but then it crashes unexpectly..
Does anyone know why? What should I do to avoid it in order to be able to run my application in another PC. It uses the winsock library and mysql API for C, so I'm wondering if I need to configure something else that the VS2010 doesn't do by its own while linking or so.
Did you depend on the current directory? We had a case once that turned up where that was the problem.
You should set the build configuration to Release, and use the .exe from the Release folder, once you rebuild the application. The executable from the Debug folder is (in principle) only used by Visual Studio internally, and it would therefore make no sense to redistribute it.
Note however, that in order to run any application created with visual C++, the user must install the visual C++ redistributable package, so make sure that the user has got that installed.
I was working on a project when all of a sudden VS stopped recompiling my project each time I debugged (mid way through working... I never changed anything). So it keeps running the same old build over and over.
I don't want to have to "clean build" each time, and I've followed the instructions here (Visual Studio 2010 doesn't rebuild changed code unless I manually select "Rebuild"). Surprisingly, they were already set (prompt to build when project outdated, build is checked under configuration manager).
However, it still never prompts me (except for after clean), and it's getting really frustrating. I'm using VS c++ if it helps.
I just had the same issue. This might solve your problem:
Tools->Options->Project and Solution->Build and Run.
There is an option what to do for "On run, when projects are out of date". Set this to "always create". This will mean that if you compile a project which depends on another project in your project folder, then the other project is compiled first, just as you want.
In my case, this option was set but then set to something else after a crash of VS2010.