Unwanted database file being generated, how to prevent and remove? - c++

When generating a new C++ project - specifically, I create a new "Empty Project", the directory the file is stored in seems to contain an .sdf file. This seems to be generated whenever I open the project in Visual Studio 2013, even after I delete it. I also seem unable to open it, though I sincerely doubt it could contain anything.
This project does use SFML 2.3, but won't be using databases in any real capacity, so I had not specified in any options that something like this should be done. I'm not quite sure as to why the system is doing this, then.
Basically, I just want to stop VS from making this file upon opening the project. I'm not sure if uninstalling SQL Server will do anything to solve this, or if there is something else I need to consider.

The sdf file is created and owned by Visual Studio, not your program. When you open a solution Visual Studio will check to see if this file exists. If it doesn't VS will create one and populate it with code browsing and other information about the projects it manages. If the file already exists VS will open it and update the database with any code changes that happened outside of VS.
Although this file is not required for Visual Studio to load a solution or project it is required for some very useful functionality to work correctly. There's no real benefit in preventing VS from creating or accessing this file and I recommend you abandon the idea of preventing VS from creating it.

Related

Changing .fl file in fluid doesn't change the UI when run with Visual Studio

I am working on a C++ project on Visual Studio which relies on UserInterface.fl file for its GUI. Intuitively I would understand that changing the UserInterface.fl file with FLTK would allow me to see those changes on actual GUI when built and run with Visual Studio, however that doesn't happen.
I have already tried restarting Visual Studio and rescanning and rebuilding the project but it hasn't helped.
The .fl contains the following lines of code to which I have tried to make changes as well to see results, but without success.
header_name {UserInterface.h}
code_name {UserInterface.cpp}
I would expect the changes to be visible on the GUI as soon as I change the UserInterface.fl file using FLTK without even having to alter the UserInterface.cpp or UserInterface.h files.
Thanks for any help in advance.
FLTK's fluid environment is completely different from your Visual Studio .sln solution. Thus your files would not automatically update to show the changes made through Fluid. However, you should be able to find the option of "Write Code" under the "File" menu in fluid. The shortcut is "Ctrl+Shift+c". This writes your code to the corresponding .h and .cpp file.

How to fix "error C1083: Cannot open source file:" in Visual Studio C++

I was beginning to use Visual Studio 2013 to work with OpenCV.
I had completed a simple project that I need and was just doing some cleanup.
The compiler begin giving the message.
error C1083: Cannot open source file:
What I have tried so far:
Creating a new console application in a separate file and trying to compile it, just created . -> same error.
Repairing Visual Studio using the original installation disk. -> same result on new just created project "error c1083;
Uninstalling Visual Studio and then reinstalling it. -> same result on new just created project "error c1083"
Things I have noticed. My compiler is not creating a .pch file or at least I cannot find it. I have precompiled headers enabled. /Yc for stdafx.cpp and /Yu. for other files if I have any.
If I use a previously created project that was working the IDE will run it, but if I change anything in the source file I get the same error.
I have tried placing projects in very short paths and in the normal location for the compiler.
Solution explorer sees and will open the source file.
I am beginning to think something is corrupted in my operating system. (Windows 7).
I have been thinking I might format the disk and reinstall Windows, but thought I might ask for suggestions on this problem first.
"
What do you mean by 'doing some cleanup'? It is quite unlikely that your OS is corrupted. There is probably something wrong with your project properties, but I couldn't tell you what without better information"
This was just a simple project to place cross hairs on the input from a USB microscope which was spindle mounted on a CNC milling machine for centering purposes. I was just changing the on screen position and size of the cross hairs. Then when I recompiled the problem started. I thought it might be a corrupted file because of the fact that it persisted after uninstalling and reinstalling Visual Studio. The fact that a freshly generated project would not compile made me suspicious.
"
Looks like something in your Project/Properties is not right. It is looking for the files in the wrong directory"
You are probably correct, but I am a novice and have spent many hours trying to find what it may be any suggestions for what settings to change would be greatly appreciated.
"
Do your TMP and TEMP environment variables point to directories that (1) exist (2) you have write permission to and (3) have free space? "
Yes sir The environment variables are set and the directory has read write permission. There is > 1T of free disk space.
"
Also try (with VS closed) deleting the registry keys HKCU\Software\Microsoft\VisualStudio\12.0 and 12.0_Config and the directory %LOCALAPPDATA%\Microsoft\VisualStudio\12.0, then open VS and try again with a fresh project. This will cause VS to regenerate all caches and "transient" information (it will also reset all your settings, so beware)."
Sir: I deleted the keys and the directory you recommended, generated a fresh project and tried to compile it. The compiler generated the same error. I genuinely appreciate the suggestion.
"VS only allows closed source development"
Pointed, consider the source of VS.

Turn off Visual Studio popups

I have a large project that I have to load and work on. Nothing I can do about it - just load the solution and all projects within it.
Problem is that first several minutes VS loads project one by one and it constantly inform me about it by constantly displaying some "Loading project is required..." window. Sure, I know it is required, but cannot it be somehow done in the background? I would be content if I could just open some text editor and tune configs or read documentation without popups stealing the focus.
It happens on all project regeneration (we use GYP) - since VS solution and projects are generated each time I have to work on new C++ defines/flags/dependencies settings I have to sit and watch VS spamming those little windows.
It has another drawback - if right after project regeneration I'll try to build it VS will "block" - it will complain that it cannot close the project when build is running and I have to terminate the build in order to "close" the project. I understand that what it really does is close and reopen it in order to update settings... but popup that locks whole IDE certainly makes it more annoying.
I know that I can disable automatic reload of source file when it was edited outside by e.g. Sublime Text. Are there some solutions that would allow me to do the same for projects? Some settings, plugins or register entries that would prevent those windows from spamming or which would reload project when it suits me? It's really annoying when I have to switch to ST each time I regenerate and build projects because Visual Studio will stay locked until the build is finished.
I have a similar issue with CMake-generated Visual Studio solutions. While I don't have a solution, I've found a workaround which works just fine for me - close the solution before re-running the generator, and open it again when the re-run's finished. Under normal keymappings, it's Alt+FT to close, and Alt+FJ1 to open again.
Disable Intellisense, Visual Studio usually takes a great deal of time during project load parsing headers and building up its intellisense database. Disable that and see if your load times improve.
Might not be applicable if you can't change your solution, but I'd try to move less important modules/projects to DLL or prebuilt libraries. Candidates for this are 3rd party / external libraries that you don't plan on changing or potentially really stable sections of your code base.
Good luck.
The VS system records the last solution associated with each project in the .SUO files. If you delete the .SUO files, you will then be able to open the project files individually, and then save a solution containing just the projects you want to open.

Redeveloping MFC application

I've got a program written in c++ and have to make some modifications to it. Howerver, I haven't got any solution file or a like, just a bunch of .h, .cpp, .obj, .dpb, .dll, .mdi, .dfm, .res, .tds, .bpl files and an .exe file.
So I can start an application, see what it's doing and what the controls are, but when it comes to adding changes trying do to map behaviour of UI to source code files seems just to tedious.
Is it possible to recreate some kind of solution file or just to simply the process? (I am using VS 2012 and an app was written in 2002).
These file extensions indicate the source is from a Borland IDE. That .mdi file I think signifies Borland's multiple-document-interface... I'll venture to guess this project would be quite difficult to "recompile" using Visual Studio. I don't even see a .rc (resource file) in your list. Rewriting may be the easiest path, depending on the complexity of the application...

app.config visual studio creation

A simple question, where I have perhaps just overlooked the obvious.
I am trying to use ApplicationSettings in C++ (.NET) using Visual Studio 2010 Express (I also use 2008 pro)
However I can get nowhere with this - if I try to use the form designer to add a setting i get "No settings file exists in project. Add a settings file and try again". How do I add a setting file (app.config)? There is no option in any of the "add" sections. I have tried adding a file manually both from within VS (create a new file and save) and from Explorer.
Before I crack and just write some code to read an XML config file - please can someone explain the correct way to setup and use app.config - just, for example, to save the location and size of the main form.
Is this a managed C++ project?
A settings file is based on .Net's ApplicationSettingsBase and ConfigurationManager classes, so unless you're using .Net you won't be able to use them easily.
EDIT: I've just created a managed C++ project, and you're right, there is no option to add a settings file.
In a C# project this produces a static class derived from ApplicationSettingsBase, which Visual Studio updates automatically from a GUI based configuration screen. I can only assume that there is no support for auto generation of a managed C++ class instead. Sorry.