visual studio 2005

Started by
25 comments, last by ixuz 14 years, 7 months ago
Quote:Original post by Badgerr
A manifest is Microsoft's way of making it practically IMPOSSIBLE to distribute a project in the same way that you could with any VC compiler pre-2003.
What way was that? With every version of Visual Studio, if you're deploying the app properly, you need to install the Visual Studio redistributable package - If it worked before, then it was just luck (The runtimes were probably installed by some other application).

Quote:Original post by Badgerr
Basically there is a folder in the windows directory (WinSxS) holding various versions of runtimes required for most applications compiled with the C libraries (and probably .net, etc). I think it was supposed to make things like backward compatibility easy, as well as provide a common location for all runtimes for all versions of everything without each version having to distribute the files specific to the version of the compiler that was used to make it. In reality, it's just an extra hurdle, where you either link statically, include the manifest and runtimes in the installation directory and insert a custom manifest in your exe so it knows to use the local copies, or install the c runtimes on any machine you want to run the software on.

What it's good for? In reality, so far I have seen no benifits - only hinderences.
Pretty much - it's so that you can have all sorts of versions of the CRT installed, and applications will use the correct one. This is usually less of an issue for home PCs, but if you were the IT guy deploying some new software onto your companies network, there was a chance that the new app would overwrite an older version of some CRT DLLs with newer ones, and break all of the applications that used the older one.
Advertisement
Quote:What it's good for? In reality, so far I have seen no benifits - only hinderences.


Manifests define what feature level of a given DLL that you're linking against. It's similar to how Linux uses "libwhatever.so.5" as a symlink to "libwhatever.so" (if you're lucky).

However, manifests additionally allow things like cross-versioning, where an application that uses custom controls version 4.7 can load a plug-in that uses custom controls version 6.0, even though custom controls version 6.0 is not a re-distributable, and is a different binary from 4.7.

In addition, manifests with system-managed side-by-side installation allows Microsoft to easily update/patch DLLs using Windows Update. I think they learned this when the gdiplus DLL problem hit -- scanning the entire disk for any DLL that might be a gdiplus DLL was not a pleasant experience for people applying updates...

It does solve some problems, and if you go through the half-hour to learn how to create a proper setup project (using merge modules for runtimes, etc), then the install/uninstall is very simple for the user. But a lot of developers, for some reason, would be happy to spend years learning how a compiler and a linker works, without spending a few hours learning how the main delivery vehicle for the platform works. I guess that's their choice, but then complaining isn't really warranted IMO.
enum Bool { True, False, FileNotFound };
Quote:Original post by Evil Steve
Quote:Original post by Badgerr
A manifest is Microsoft's way of making it practically IMPOSSIBLE to distribute a project in the same way that you could with any VC compiler pre-2003.
What way was that? With every version of Visual Studio, if you're deploying the app properly, you need to install the Visual Studio redistributable package - If it worked before, then it was just luck (The runtimes were probably installed by some other application).


The way we did it where I work (before everything moved to VS2005), we used VC6, and deploying the application was a case of putting our applications in a directory, copying the 3(?) msvc*.dll type files in, and running it through NSIS. It worked, and no one seemed to do it any other way.

Now we use 2005, we just bundle the vcredist.exe into the installer and exec it during install.

Quote:Original post by hplus0603
Quote:What it's good for? In reality, so far I have seen no benifits - only hinderences.


Manifests define what feature level of a given DLL that you're linking against. It's similar to how Linux uses "libwhatever.so.5" as a symlink to "libwhatever.so" (if you're lucky).

However, manifests additionally allow things like cross-versioning, where an application that uses custom controls version 4.7 can load a plug-in that uses custom controls version 6.0, even though custom controls version 6.0 is not a re-distributable, and is a different binary from 4.7.

In addition, manifests with system-managed side-by-side installation allows Microsoft to easily update/patch DLLs using Windows Update. I think they learned this when the gdiplus DLL problem hit -- scanning the entire disk for any DLL that might be a gdiplus DLL was not a pleasant experience for people applying updates...

It does solve some problems, and if you go through the half-hour to learn how to create a proper setup project (using merge modules for runtimes, etc), then the install/uninstall is very simple for the user. But a lot of developers, for some reason, would be happy to spend years learning how a compiler and a linker works, without spending a few hours learning how the main delivery vehicle for the platform works. I guess that's their choice, but then complaining isn't really warranted IMO.


I guess half an hour is better than what we currently do. All this stuff makes sense, maybe it's time to find out how to do it properly.
________________________________Blog...
oooh, I'm pretty lost now, I don't know where I should start. I may seem dumb but it seems like I need a step by step tutorial :(

The compiled solution is just containing the main() function and a cout. I can look up manifests more soon, but first of all I'd at least like to get my program to work.

My friend installed vcredist_x86 but the program still doesn't work, what's missing?
New Project
-> Setup and Deploy Projects
-> Setup Wizard
-> Build project

This spits out a .exe and a .msi.

Put the .exe and the .msi in a directory on your web host, and link people to the .exe to install. The directory on the web host should be entered into project settings of the setup project, too (before building it).

If you don't want to use a web host, you can just make sure that the .exe and the .msi is in the same folder on the hard disk, and start the .exe, and it should use the .msi as-is (without downloading it).

By the way: We're still waiting for the output of the "dependency checker" tool I linked to above, from the machine that has the problem.
enum Bool { True, False, FileNotFound };
Wow, thanks for the quick response! Okay I've done what you've said, I got an .exe file and a .msi file. I'm trying to contact my friend now so he can test the dependency checker, and what is this install doing, does it install the redist correctly?
Quote:Original post by hplus0603
It does solve some problems, and if you go through the half-hour to learn how to create a proper setup project (using merge modules for runtimes, etc), then the install/uninstall is very simple for the user. But a lot of developers, for some reason, would be happy to spend years learning how a compiler and a linker works, without spending a few hours learning how the main delivery vehicle for the platform works. I guess that's their choice, but then complaining isn't really warranted IMO.


To be fair, the documentation for setup and deployment is some of the worst that Microsoft has ever produced. It's a lot less frustrating studying how the compiler and linker works than trying to figure out how to do stuff with deployment projects.
Quote:what is this install doing, does it install the redist correctly?


It's supposed to, if the dependency auto-detect worked correctly. (It's the exe that installs redists; the msi installs your app only)

enum Bool { True, False, FileNotFound };
Okay, I'm aware that this problem isn't related to winsock, it seems like the project configuration is the problem. My friend have tested my program with the dependency walker, this is the results:

Logfile
Quote:
*****************************| System Information |*****************************

Dependency Walker: 2.2.6000 (32-bit)
Operating System: Microsoft Windows XP Professional (32-bit)
OS Version: 5.01.2600 Service Pack 2
Processor: x86 Family 6 Model 15 Stepping 11, GenuineIntel, ~2399MHz
Number of Processors: 4, Mask: 0x0000000F
Computer Name: P
User Name: Pe
Local Date: 01 September 2009
Local Time: 12:38:45 AM Västeuropa, normaltid (GMT+02:00)
OS Language: 0x041D: Swedish
Memory Load: 62%
Physical Memory Total: 2,145,824,768 (2047 MB)
Physical Memory Used: 1,336,606,720
Physical Memory Free: 809,218,048
Page File Memory Total: 4,130,246,656
Page File Memory Used: 1,318,957,056
Page File Memory Free: 2,811,289,600
Virtual Memory Total: 2,147,352,576
Virtual Memory Used: 53,174,272
Virtual Memory Free: 2,094,178,304
Page Size: 0x00001000 (4,096)
Allocation Granularity: 0x00010000 (65,536)
Min. App. Address: 0x00010000 (65,536)
Max. App. Address: 0x7FFEFFFF (2,147,418,111)

********************************| Search Order |********************************
* *
* Legend: F File E Error (path not valid) *
* *
********************************************************************************

Side-by-Side components (Windows 2000/XP/2003/Vista/+)
The system's "KnownDLLs" list
[F ] c:\windows\system32\ADVAPI32.DLL
[F ] c:\windows\system32\APPHELP.DLL
[F ] c:\windows\system32\COMCTL32.DLL
[F ] c:\windows\system32\COMDLG32.DLL
[F ] c:\windows\system32\CRYPT32.DLL
[F ] c:\windows\system32\CRYPTUI.DLL
[F ] c:\windows\system32\GDI32.DLL
[F ] c:\windows\system32\IMAGEHLP.DLL
[F ] c:\windows\system32\KERNEL32.DLL
[F ] c:\windows\system32\LZ32.DLL
[F ] c:\windows\system32\MPR.DLL
[F ] c:\windows\system32\MSASN1.DLL
[F ] c:\windows\system32\MSVCRT.DLL
[F ] c:\windows\system32\NETAPI32.DLL
[F ] c:\windows\system32\NTDLL.DLL
[F ] c:\windows\system32\OLE32.DLL
[F ] c:\windows\system32\OLEAUT32.DLL
[F ] c:\windows\system32\OLECLI32.DLL
[F ] c:\windows\system32\OLECNV32.DLL
[F ] c:\windows\system32\OLESVR32.DLL
[F ] c:\windows\system32\OLETHK32.DLL
[F ] c:\windows\system32\RPCRT4.DLL
[F ] c:\windows\system32\SHDOCVW.DLL
[F ] c:\windows\system32\SHELL32.DLL
[F ] c:\windows\system32\SHLWAPI.DLL
[F ] c:\windows\system32\URL.DLL
[F ] c:\windows\system32\URLMON.DLL
[F ] c:\windows\system32\USER32.DLL
[F ] c:\windows\system32\USERENV.DLL
[F ] c:\windows\system32\VERSION.DLL
[F ] c:\windows\system32\WININET.DLL
[F ] c:\windows\system32\WINTRUST.DLL
[F ] c:\windows\system32\WLDAP32.DLL
[F ] c:\windows\system32\WOW32.DLL
The application directory
[ ] C:\Documents and Settings\Pe\Mina dokument\Mina mottagna filer\debugThe 32-bit system directory
[ ] C:\WINDOWS\system32The 16-bit system directory (Windows NT/2000/XP/2003/Vista/+)
[ ] C:\WINDOWS\systemThe system's root OS directory
[ ] C:\WINDOWSThe application's registered "App Paths" directories
The system's "PATH" environment variable directories
[ ] C:\WINDOWS\system32 [ ] C:\WINDOWS [ ] C:\WINDOWS\System32\Wbem [ ] C:\Program\Delade filer\Adobe\AGL [ ] C:\Program\QuickTime\QTSystem
***************************| Module Dependency Tree |***************************
* *
* Legend: F Forwarded Module ? Missing Module 6 64-bit Module *
* D Delay Load Module ! Invalid Module *
* * Dynamic Module E Import/Export Mismatch or Load Failure *
* ^ Duplicate Module *
* *
********************************************************************************

[ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\WINSOCK BUGFINDING.EXE
[ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\MSVCP80D.DLL
[ ^ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\MSVCR80D.DLL
[ ^ ] c:\windows\system32\KERNEL32.DLL
[F^ ] c:\windows\system32\NTDLL.DLL
[ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\MSVCR80D.DLL
[ ] c:\windows\system32\MSVCRT.DLL
[ ^ ] c:\windows\system32\KERNEL32.DLL
[F^ ] c:\windows\system32\NTDLL.DLL
[ ] c:\windows\system32\NTDLL.DLL
[ ^ ] c:\windows\system32\KERNEL32.DLL
[F^ ] c:\windows\system32\NTDLL.DLL
[ ] c:\windows\system32\KERNEL32.DLL
[ ^ ] c:\windows\system32\NTDLL.DLL
[F^ ] c:\windows\system32\NTDLL.DLL

********************************| Module List |*********************************
* *
* Legend: D Delay Load Module ? Missing Module 6 64-bit Module *
* * Dynamic Module ! Invalid Module *
* E Import/Export Mismatch or Load Failure *
* *
********************************************************************************

Module File Time Stamp Link Time Stamp File Size Attr. Link Checksum Real Checksum CPU Subsystem Symbols Preferred Base Actual Base Virtual Size Load Order File Ver Product Ver Image Ver Linker Ver OS Ver Subsystem Ver
----- ------------------------------------------------------------------------------------------- ----------------- ----------------- --------- ----- ------------- ------------- --- --------- ------- -------------- ----------- ------------ ---------- ------------- ------------- --------- ---------- ------ -------------
[ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\MSVCP80D.DLL 01/02/2009 02:05p 23/09/2005 08:46a 1,028,096 A 0x0010AE15 0x0010AE15 x86 GUI CV 0x10480000 Unknown 0x000FC000 Not Loaded 8.0.50727.42 8.0.50727.42 0.0 8.0 4.0 4.0
[ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\MSVCR80D.DLL 29/06/2007 03:07a 23/09/2005 08:44a 1,171,456 A 0x00125902 0x00125902 x86 GUI CV 0x10200000 Unknown 0x00120000 Not Loaded 8.0.50727.42 8.0.50727.42 0.0 8.0 4.0 4.0
[ ] c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\WINSOCK BUGFINDING.EXE 19/08/2009 02:32a 19/08/2009 02:32a 45,056 A 0x00000000 0x0000C4C0 x86 Console CV 0x00400000 Unknown 0x0001B000 Not Loaded N/A N/A 0.0 8.0 4.0 4.0
[ ] c:\windows\system32\KERNEL32.DLL 04/08/2004 01:33a 04/08/2004 10:33a 997,376 A 0x0010308A 0x0010308A x86 Console CV 0x7C800000 Unknown 0x000F8000 Not Loaded 5.1.2600.2180 5.1.2600.2180 5.1 7.10 5.1 4.0
[ ] c:\windows\system32\MSVCRT.DLL 04/08/2004 01:33a 04/08/2004 10:34a 343,040 A 0x00060743 0x00060743 x86 GUI CV 0x77C00000 Unknown 0x00058000 Not Loaded 7.0.2600.2180 6.1.8638.2180 5.1 7.10 5.1 4.0
[ ] c:\windows\system32\NTDLL.DLL 04/08/2004 01:33a 04/08/2004 10:33a 712,704 A 0x000BB654 0x000BB654 x86 Console CV 0x7C900000 Unknown 0x000B2000 Not Loaded 5.1.2600.2180 5.1.2600.2180 5.1 7.10 5.1 4.10

************************************| Log |*************************************

Error: The Side-by-Side configuration information for "c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\WINSOCK BUGFINDING.EXE" contains errors. Det hr programmet kunde inte starta eftersom programmets konfiguration r felaktig. Problemet kanske kan rttas till om du installerar om programmet (14001).




Error message
Quote:
Error: The Side-by-Side configuration information for "c:\documents and settings\pe\mina dokument\mina mottagna filer\debug\WINSOCK BUGFINDING.EXE" contains errors. This program could not start because the program configuration is wrong. The problem may be corrected if you install the software (14001).


Any ideas?
Thanks in advance // ixuz
It looks as if you're trying to distribute a debug version of your application. You can't do that - the runtime redist doesn't include the debug version of the runtime.

Try recompiling your program in "Release" mode and try again.
NextWar: The Quest for Earth available now for Windows Phone 7.

This topic is closed to new replies.

Advertisement