Minimal output of Visual Studio project - visual-studio

As a beginning programmer, my projects tend to be small in terms of lines of code - most of the times they are console applications. While I understand that Visual Studio 2013 is meant for more professional usage, in my case it seems unnecessary that ~600 bytes worth of code produces me ~10 megabytes of output, the biggest culprit being the
SQL Database File.
Is there a way to compile my code directly into an executable file without any debugging left-overs and databases? My perfect project would contain source files, an executable file and project files needed by Visual Studio.
Thanks in advance for your help.

Related

Comparing .diagsessions files

In Visual Studio 2019 version 16.11.15, I'm using the Performance tool to measure performance degradation that occurred in a new version of our program (a huge, mainly C program).
Usually I run both the old version and the newer version on the same test, and manually going through the performance tool file to see the difference.
I was wondering if there is a way to automatically compare between two .diagsession files - something similar to a diff command.
I am aware of this How to: Compare performance data files
, however they are talking about .vsp files.
Is this even possible on Visual Studio?

How to build an F# application with dependencies downloaded from Paket?

I'm having a hard time trying to build a F# project in Visual Studio that has dependencies downloaded with Paket. It raises several of the following errors (with different dlls each time):
Could not resolve this reference. Could not locate the assembly "XPlot.Plotly.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)
For this very example, visual studio adds the option -r:C:\projects\StarWars-social-network-master\packages\XPlot.Plotly\lib\net45\XPlot.Plotly.dll. The file actually exists in my filesystem, so I don't know what I am doing wrong. Can anyone point me to a workaround?
Thank you.
From the directory name, I guess you're looking at Evelina Gabasova's Star Wars network analysis.
As far as I can tell, the project uses F# Script files and so you do not need to compile it at all. It is designed to be used with F# Interactive. Once you open the project, you can look at the individual script files *.fsx, select blocks of code and run them interactively - If you are using Visual Studio, this is done using Alt+Enter - other editors use either this or Ctrl+Enter (Xamarin Studio).
Many F# data analysis scripts follow this pattern - you're not really building a project that needs to be compiled and executed as a whole, so running bits of code from script files immediately makes a lot more sense in this context.

Debugging Qt program with Microsoft Visual Studio 2013

I created a complex program based on different modules which load after program has started. The program structure is very similar to QtCreator. Frankly speaking I've taken part of code from QtCreator. (plugin management system)
I'm trying to debug my program with Visual Studio 2013. Very often the debugger doesn't show correct values and skip lines of code or jump from a following line of code to the previous line. It seems to me that pdb file doesn't correspond to the proper file. How is that may be possible? Should I set specific or additional parameters for debugging Qt programs in MSVS 2013? What might be the reason of such behaviour of debugger?
ps. I installed Qt 5.4.1 for Windows 32-bit (VS 2013, 705 MB) along with Visual Studio Add-in 1.2.4 for Qt5 (156 MB) properly.
I've made cleanup and rebuild several times, tried to delete related files after compilation - it didn't help.
Go to project property pages-> C/C++ ->Optimization. Set 'Optimization' property to 'Disabled(/Od)'.
Thanks to SaZ!

Why are visual studio pdb files so much larger than elf debug symbols

I'm working on a project that compiles with Visual Studio 2010. The build process for this project is outside of my control, and I can only modify source code, so there may be some setting that I'm not aware of that is causing this behavior.
However, I notice that the project that I'm working on, which has something on the order of a megabyte or two worth of source code, is being created with pdb several pdb files and some of them are larger than 100 MB.
I have a build-from source Linux system on another computer (Gentoo Linux) that has all of the debug symbols from all installed applications, automatically saved in /usr/lib/debug, and that entire directory is only 600MB. So, on Linux, 2GB of compressed source code turn out 600MB of debug information, but on Windows, 1-2MB turns out 100's of MB's of debug information?
Where does this huge difference in size come from?
By default Visual Studio will instruct to generate the PDB files with as much information as possible, you can configure it to generate smaller files through the settings of the project (the exact steps depend on the type of project, for C# you can find it under:
[ProjectProperties] -> build -> Advanced... -> Output / Debug Info.
Setting it to pdb-only will generate much smaller files, but will provide less help when debugging locally.

Different binary file size after converting to VS 2010

When I converted a VS 2005 project to VS 2010, with all projects still pointing to compile for the .NET 2.0 Framework, the dlls generated are a totally different file size. Is this normal or something to be concerned about?
The difference in file size is probably due to changes in the compiler shipped with the new version of Visual Studio. In theory, it should be more efficient. It should not be anything to worry about, but that doesn't mean you should forgo testing.
Microsoft does publish information on "Breaking Changes" with the new version of Visual Studio, e.g., http://msdn.microsoft.com/en-us/library/cc714070.aspx for VB, http://msdn.microsoft.com/en-us/library/bb531344.aspx for C++, and http://msdn.microsoft.com/en-us/library/ee855831.aspx for C#.

Resources