Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
As the title says, my MSI that is built in VS 2015 is a whole 4mb smaller than my MSI built in VS 2010. In addition to the file size difference, the Win10 installer only seems to be able to be installed on Win 8+, giving a missing DLL error on Win7. I've tried searching a number of phrases, but I can't find anything that relates to my question. Can anybody shed some light on this? Any ideas would be greatly appreciated. I can provide more information, but I'm not sure what you'd need, so let me know if you need more info.
A few comments of explanation:
MSI files are not built from scratch - they are based on a schema MSI file that's used as the starting point. If the two VS editions use different schemas you'll see different MSI files, especially if support for old stuff was deleted.
MSI files are sparse files, not continuous data streams. If the mechanism for updating the database (which is what MSI files are) is different then the file structure may be different, with less unused space in it.
MSI files contain data other than your files. There are binary files containing bitmaps, calls to detect the NET framework, C++ Dlls to call managed custom actions, all kinds of things that may be different between the two versions of Visual Studio. Any change here will change the size of the MSI file.
Is this an actual issue? I suspect that if somebody used VS 2010 and VS 2015 to generate a 100MB code file, nobody would worry if they came out as different sizes because they are different compilers with different internals.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
Improve this question
I've been unable to build C++ projects since upgrading to VS2022. No matter what I do, it cannot programmatically find the Windows SDK files it needs, always claiming MSB8036 (the extremely generic "it can't find the Windows SDK" error).
To be absolutely clear, the version of the Windows SDK that it is looking for (10.0.19041.0) is the one that is installed. At various times, it has been installed using both the Visual Studio installer and the standalone installer (the latter of which apparently fixed this issue for some people). I had even tried installing an older SDK several times, which still failed, even when solutions were specifically retargeted.
EDIT: To be even more clear, I've also tried simple solutions like the one outlined here.
So far, I have tried:
uninstalling and reinstalling (after a recent reinstall, the VS IDE won't load anymore, so I'm stuck with Build Tools)
installing a different edition (Build Tools vs Community)
running sfc /scannow (it found and fixed some errors, but none fixed the issue with MSBuild)
removing the symlinks I had and allowing Visual Studio to install directly to my system drive (to be clear, the symlinks did not cause issues with VS2019, but I was unsure whether VS2022 had issues with them)
running InstallCleanup.exe -f
installing VS2019 again (despite working before, it won't anymore)
checking the environment variables manually (everything points to where the files are located)
checking the registry manually (couldn't find anything, not sure what I'd be looking for)
I was able to get it to pass the check for the Windows SDK by hardcoding the (x64) paths (which were literally the same) into the Microsoft.Cpp.WindowsSDK.targets file, but it would then fail to find windows.h at build time (this is also untenable for non-x64 targets).
I am out of ideas. Has anyone else had this issue? Are there any fixes that don't involve reinstalling Windows?
#john's comment here provided the answer. I then was able to grab the proper SDKManifest.xml from here, which is basically the same as the version given in the video with the Windows SDK version swapped out.
This question is much asked and much answered, but I can't find a single answer that really seems to get to the nub of the problem and which really answers the question as asked. Which is to say, if I simply Create New Project -> Console App -> (choose a name for the project) -> Create then the project is in 32-bit mode. It's trivial to click where it says X86 in the tool bar and change it to X64. Problem solved. You don't even have to go into Configuration Manager or any similar complicated strategies that many answers through the years have suggested. But still, I have to change the X86 to X64 every single time I make a new project. And in addition, the very process of defaulting to X86 has created a gazillion little files and folders for the X86 version of the project that really aren't needed. So the question is not how to make a 64-bit app. That's extremely easy. And the question is not about how to convert a 32-bit app into a 64-bit app. That's also extremely easy. The question is how to configure Visual Studio 2019 Community Edition so that a new project defaults to 64-bit in the first place.
By the way, all the answers on the Microsoft forums start out with "Open the C++ project that you want to configure." But there is no existing project if what you are trying to do is to set the default for new projects. Also, I did find default.vcxproj and played with it a bit. I didn't see anything there that established a default of X86 vs. X64. But I did see that the X86 entries were in front of the X64 entries. I moved the X64 entries in front of the X86 entries, but that did not change the default. It did change the order of the way entries were displayed when I clicked the X86 vs. X64 box in the tool bar. Another promising file was shared.vcxproj. It appears that it may hold the default, but there I haven't yet found any forum messages suggesting that it should be changed to solve this problem.
I am on university currently and in this semester almost all subjects are related to C++, the problem is that all the resource I am getting are VS projects and solutions and the version of Microsoft Visual Studio for Mac OS does not support C++. To make things even worse we are using couple of different libraries but If I could somehow solve the problem of opening and editing project files I think that importing the libs would be small problem. So, is there any way that I can open and work with that projects and solutions beside Parallels cause I don't have money for that.
If the number of source files is small you can create a new XCode project and add them to that project manually. If there are a lot of source files maybe some of the tools discussed here can help to automate at least some parts of the conversion.
You can also try one of the VSCode extensions that can open sln files, like this one and then setup a clang workflow.
If the code uses Windows specific APIs or libraries this won't be enough and you will have to somehow get a Windows machine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have recently written a fairly simple code for windows app, a 2048 game, including some basics such as icon, background and stuff, 4 buttons for different directions and 4x4 array of static windows for output. The Code isn't really "nice" but as I'm still learning I find it enough since it work ( at least on my PC ). I'm using default VS13 config, haven't changed anything after I installed it and the code is written in c++.
Codes can be found here: https://www.dropbox.com/sh/15y1daq2h3jm8p7/AADp0m1EfUJo3W2z315Zgd0Wa
Now what bugs me is that the program compiles with 0 warnings or errors and works just as I intended it when I run it either via debug or from desktop on my PC, but when I upload it to dropbox and want to start lets say on laptop then it doesn't work.
Also if I try to compile the exact same code in Codeblocks I can't and there are warnings that many functions weren't declared in the scope.
Can any1 explain why is this happening and how can I fix it ?
The basic problem you are facing is that you are trying to compile the code outside of the Visual Studio environment for a VCPP code that you have written.
When you debug the code using Visual Studio, all the required files/dependencies are injected during compilation.
I'd recommend packaging the code using Visual Studio and try running the exe on your laptop.
Make sure you have the correct version of VC++ runtime environment installed on your target machine. (You can optionally also include the setup with your packaged setup.)
From here: https://stackoverflow.com/a/20890610/1477051
As you can see here, the MSVCP DLL is the platform's
implementation of the C++ Standard Library. In short what that means
is you cannot distribute your application without needing the "stuff"
that these libraries provide. All compilers regardless of platform
would need some kind of implementation of the Standard Library.
Typically this is distributed in the form of libraries.
However you can distribute your application so that the "stuff" is
built in to your program directly, rather than being shipped in a
separate DLL. In order to do this, you must statically link your
application to the Standard Library.
There are a few ways to accomplish this. One way is in Project
Settings. In "Configuration Properties" > "C/C++ Code Generation" >
"Runtime Library", choose "Multithreaded (/MT)" as opposed to
"Mutithreaded (Static)".
By the way, the "D" in "MSVCP120D.dll" you mentioned above means
"Debug." This means that you are trying to distribute a debug build of
your program. You should (almost) never do this. Distribute release
builds instead.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
A simple question, I have made a program that runs on my computer perfectly but not on someone else's computer. This simple question is a big headache of mine. I have read at least thousands of topics on the internet.
I tried to copy msvcp90.dll and other dll files to the target machine but that didn't work. I read an article which says you have to copy a manifest file too. Now I don't know which manifest file to copy.
I also have created my own dll file but that didn't work either.
Can anybody please help me, I'm in a big headache (I don't want to statically link the libraries, just tell me the concept of dynamic linking). Thank you.
One other thing, I have used windows.h header file in my program and a lot more header files. I am using visual studio 2008.
First, make sure you are compiling the release version of your application - typical users never have the debug c-runtime installed.
Second, you probably want to install the full c-runtime library on the client machine that corresponds to the version of Visual Studio you are using. Here's a link for the VS 2008 runtime: C Runtime Library