locked
vcredist_x86

    Question

  • I packaged vcredist_x86 with my application, but it doesn't work.  I am trying to install my application on a computer that doesn't have C++ Express Edition installed.  They click on it, it seems to install but the application still won't run.  Also, when I try to run it on another computer (that I own) it gives me this error when installing: "Error 1723. There is a problem with this Windows Installer package.  A DLL required for this install to complete could not be run.  Contact you support personnel or package vendor". 

    Thanks.

    Friday, August 10, 2007 9:39 PM

Answers

  • It's not added directly to the project folder. There will be subdirectories (at some level), called "release" and "debug". Search for those.
    Tuesday, August 14, 2007 7:20 AM

All replies

  • It the application native or managed? If it's managed, have you verified that the .NET framework is installed on the target computer? Also, are you trying to redistribute the release or debug build? Does a part of your application depend on debug libraries? Load the executable up in depends.exe (which should ship with VS), and confirm that you only depend on the standard libraries.
    Saturday, August 11, 2007 10:05 AM
  •  einaros wrote:
    It the application native or managed? If it's managed, have you verified that the .NET framework is installed on the target computer? Also, are you trying to redistribute the release or debug build? Does a part of your application depend on debug libraries? Load the executable up in depends.exe (which should ship with VS), and confirm that you only depend on the standard libraries.


    I am trying to redistribute the debug build.  I think it may depend on the debug libraries, so where would I find depends.exe in my hard drive?
    Saturday, August 11, 2007 6:07 PM
  • Aha, well the debug libraries aren't part of the redistributable package. Actually, publishing an application which depends on the debug CRT would violate the VC++ license. You should only redistribute release build applications.
    Saturday, August 11, 2007 6:41 PM
  •  einaros wrote:
    Aha, well the debug libraries aren't part of the redistributable package. Actually, publishing an application which depends on the debug CRT would violate the VC++ license. You should only redistribute release build applications.


    Okay, so I won't redistribute the debug CRT.  How would I find the build application?
    Saturday, August 11, 2007 7:01 PM
  • No, the "release build" of your application -- meaning an application built against the non-debug runtime libraries. If you haven't touched the configuration properties of your project, switching from "Debug" to "Release" and compiling it all will be sufficient.
    Saturday, August 11, 2007 7:07 PM
  • So that's all I have to do?  Then I can release it on my website?
    Saturday, August 11, 2007 10:35 PM
  • Yes, but you may still have to provide the vcredist if you're linking to the CRT dlls, and they aren't installed on the target system. If you link statically to the CRT, you do not have to provide the dlls, but your executable size will be larger.
    Saturday, August 11, 2007 10:41 PM
  • Okay, and would I need Microsoft .NET Framework 2.0 on the target computer?  If so where should I download it?
    Saturday, August 11, 2007 10:48 PM
  • If your application is compiled with CLR support (/clr), you'll need it. The url, as provided by my favorite search engine, would be: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
    Saturday, August 11, 2007 10:53 PM
  • How would I tell if it was compiled with CLR support?
    Saturday, August 11, 2007 10:54 PM
  • You should familiarize yourself with the property dialogs of Visual Studio projects Smile Go to project -> properties -> configuration properties -> general and look for a setting called "common language runtime support".
    Saturday, August 11, 2007 10:58 PM
  • Okay, I just have one question, how would I tell if I linked to the CRT (sorry for the stupid question, this is my first time with C++)?
    Saturday, August 11, 2007 11:41 PM
  • That's in your project properties as well. Go to Configuration Properties -> C++ -> Code Generation, and look for "Runtime library". For the release configuration, avoid the settings with "DEBUG" in them, and for debug configuration, use the "DEBUG" settings. Other than that "* DLL *" indicates that you're linking the CRT dlls, and no "DLL" in the setting indicates that you're linking statically.
    Sunday, August 12, 2007 9:22 AM
  • It says "Multi-threaded Debug DLL (/MDd)".  So what should I set it to?
    Sunday, August 12, 2007 6:05 PM
  •  Icywind2 wrote:
    It says "Multi-threaded Debug DLL (/MDd)".  So what should I set it to?


    Is that the setting for your release or debug configuration?

    The release configuration should *NOT* link any debug libraries, so select e.g. "Multi-treaded DLL" instead. See my other posts for what they all mean, but the core matter here is: you don't want to redistribute software linking debug libraries, so you should raise an eyebrow if the release configuration setting contains "DEBUG" in it.
    Sunday, August 12, 2007 6:43 PM
  • That is the setting for the debug configuration.  What setting should I change it to when I set it to the release configuration?
    Sunday, August 12, 2007 6:46 PM
  • The release and debug build configuration is selected in combo boxes in your main Visual Studio toolbar, as well as on the top of the property window. If you want to configure the debug build, pick 'debug'. If you want to configure the release build, pick 'release'. The release build should link the non-debug libraries (in other words, not have debug in the name), and the debug build should link debug libraries (in other words, have debug in the name). I've covered the other differences between the various runtime libraries in previous posts, so please re-read them.

    Sunday, August 12, 2007 6:53 PM
  • Okay, I understand now.  Since I now set it to release it is "Multi-threaded DDL (/MD)", and is it normal when you open up the window again it is set to Active(Debug) in the Configuration window?  So, do I need to include the libraries if I have this setting?
    Sunday, August 12, 2007 6:59 PM
  • When you open the configuration properties of your project, it will automatically select the build type setting from your development environment. This is selected in the combo box I mentioned earlier, found on Visual Studio's main toolbar. To compile the release build, which is the one you should distribute to other users, you should select "Release" in the main toolbar's combo box. If you don't wish to redistribute the runtime libraries, open the configuration properties for this build type and set the runtime setting to "Multi-threaded". That will statically link the runtime libraries into your executable (meaning that their code will be merged into your .exe). This produces a slightly larger .exe, as I've already mentioned, but it'll save you the time of redistributing the libraries separately.
    Monday, August 13, 2007 1:49 PM
  • Okay, once I select it in the Prefrences window (I think that's the place) where would I find the build .exe?
    Monday, August 13, 2007 8:19 PM
  • In the "release" subdirectory of your project's dir.
    Monday, August 13, 2007 8:49 PM
  • I guessed that, and does it build it automatically?  So, it's in the preferences panel like I guessed...
    Monday, August 13, 2007 8:55 PM
  • It builds / compiles when you hit the compile-button, either from the toolbar or menu Smile

    This really is headed for quite basic stuff, so to save yourself the time, I'd urge you to get a beginners book about visual studio. It's absolutely no cake-walk to familiarize yourself with that stuff without either spending a lot of time with it, or reading a book or two.
    Monday, August 13, 2007 9:01 PM
  • Okay, I was just wondering because when I build it nothing new shows up in the project folder.  Still, it doesn't show up.  As for the book, I'll see about buying it when I go to a bookstore.
    Monday, August 13, 2007 9:20 PM
  • It's not added directly to the project folder. There will be subdirectories (at some level), called "release" and "debug". Search for those.
    Tuesday, August 14, 2007 7:20 AM
  • Okay, thanks a lot.  By the way, can you close the thread or should I (and how would I do that)?  Thanks a lot for all the help.
    Tuesday, August 14, 2007 11:02 PM