I have a Visual Studio project that compiles correctly on a Windows XP computer. I have copied the entire project to another PC running Windows 7 and it generates compilation errors.
The application uses .NET Framework 4.0 and Visual C++ redistributables, installed locally. It couldn't find these.
I realised that it was looking for the Microsoft.net in
c:\Program Files\Installshield\2012SpringLE\SetupPrerequisites
By right-clicking on the Microsoft .NET Framework 4.0 entry in the Redistributables (Installshield) window I was able to search for the merge module and corrected it to
c:\Program Files (x86)\Installshield\2012SpringLE\SetupPrerequisites
That overcame the .NET Framework 4.0 problem
However, I can't find the merge modules for the Visual C++ entry in the Redistributables (Installshield) window. Can anyone tell me where they are?
This is one of the big reasons that I suggest not only building on your machine. A proper CI build system should run on any number of build servers.
For merge modules you need to look at your merge module search path found in Tools | Options | Merge Modules Search those directories for your merge modules and copy them over to your new server.
For pretty much everything else you need to be aware of the Path Variables view (abstraction) what they are set to and how they are being used by various tables such as Binary, File, Icon and so on.
Personally I'm very meticulous when it comes to managing this and making sure everything is checked into source control properly. InstallShield will allow you to do very bad things in this area and not warn you what you are doing is problematic.
Related
I have a .NET application debug folder but not the complete visual studio solution. I am trying to generate a wix installer from this.
Things tried:
I created a project called setup using WIX toolset.
In my .net solution, there are now two projects, the main project helloWorld and the wix project setup. Inside the setup I added the reference of helloWorld and it worked fine. I am able to create the installer for my helloWorld project.
Here, I added the reference of the application project for which we want to generate the installer.
Problem:
As I have only application's - debug folder(i.e the application's .exe , .exe.config and other files) and not the complete visual solution. I am not able to generate the WIX installer from it.
Question:
Is it possible to generate WIX installer from debug folder without having the complete visual studio solution?
If possible, are there any document or things I can try?
Redistributing Debug Binaries: Debug versions of binaries should not be redistributed for several reasons (technical, security, legal, practical, etc...).
Technically: First of all, they require their own complement of debug runtime DLLs in order to run and these debug files are not present on normal, non-developer computers with standard runtime components installed. Debug dlls often have an extra "d" in their file name: mfcm140d.dll versus mfcm140.dll for example (look for them on a PC with Visual Studio installed).
Legally: Redistributing debug binaries for standard runtime components is actually illegal - it violates EULAs with regards to what is redistributable (normally). And no, this is not a trifle - don't do it.
Security: Debug binaries also contain a lot of debugging symbols and in .NET assemblies a lot of meta information that should generally not be sent to others. You would have to ask someone else for the full technical details.
Practical: Several practical issues too. For one thing: don't underestimate the confusion involved in redistributing debug versions of files. Creating an internal setup with debug binaries to test on computers set up with debug runtimes could work for internal QA though. Just wait for someone to send that to a customer or for someone to upload it for download on your web-site (by mistake).
For debugging purposes some people redistribute *.pdb files - "Program DataBase" - along with their software - instead of debug dlls. More on PDB files.
Hello WiX: With the above stated, adding debug dlls to a setup is no different from adding release files. There is a WiX Visual Studio Hello World example here. It should show you the basics of compiling a working setup with WiX and Visual Studio. There are also a bunch of quick start tips for WiX here (many links to samples).
Some Links:
install VC++ Debug Runtime Distributable (debugging purposes ONLY)
MFC100d.dll Issue in VS2010
I'm working on a Windows Forms application that installs its own prerequisites via a UI (a bit like InstallShield, or similar, might) before being usable. My application, as it stands, consists of two projects, one of which contains folders, which contain the prerequisite bits of software, which I install, quietly, using the command line, after checking whether or not they're already on the target machine.
What I'd really like to do is compile both projects and all of the third-party executables into a single executable. Can it be done? I'm open to "self-extractor" suggestions, but I don't know where to start with these in Visual Studio.
I noticed within the past couple of weeks my latest builds of a specific project are not showing up in Add/Remove programs.
I am using Visual Studio 2010, Windows7 64-bit (though I've also tried this over two Windows 32-bit machines). All latest service packs and updates are installed. The solution is made up of several projects with various references. The Setup and Deployment project is not the Install Shield version, but the one built in Microsoft project.
Previous versions of the software install fine, and still do... But if I pull down a tagged earlier version from CVS, and rebuild the installer for those versions, they do not work either.
I've opened the MSI in Orca, and I can see that the ARPNOREMOVE, ARPSYSTEMCOMPONENT are both set to 1. When the project gets installed, a registry entry SystemComponent Dword value is created. If I remove that registry entry, the application shows up. Based on everything I've read and researched I have found people that WANTED this functionality, but were told that Visual Studio can't do this on its own. Their solutions were to use Orca to add the ARPNOREMOVE or ARPSYSTEMCOMPONENT. At this point, all of the people who I found had my problem either had a basic default installer and they didn't know what name they were looking for in Add/Remove Programs or some other basic error that doesn't apply in my situation.
I've tried all of the following:
-Previous versions of tagged versions on CVS
-Multiple development machines
-Multiple computers to verify none show up in Add/Remove programs
-Resetting all Visual Studio settings
-Building from a clean development environment
-Removing Installer project from the solution and creating a new installer project
The weird part is that if I create a new solution and just create a setup and deployment project within, that installs fine. Can anyone having any idea about this help me out ?
So this is what I found out. We are using National Instruments Measurement Studio for .Net and the legacy controls. When using the legacy controls a certain merge module gets recognized as a dependency. For whatever reason, now this merge module change the behavior of the installer that is compiled. I've contacted National Instruments and am now working with them.
First, yes, you figured out the correct property name. Yes, ARPSYSTEMCOMPONENT is it which leads to an "unvisible" install under Add/Remove programs (ARP for insiders, although the name has changed post XP).
And it is possible to set/change the resulting "SystemComponent" entry in registry later which is not the case for all properties.
ARPNOREMOVE just controls if the uninstall in ARP is really possible to perform.
I have looked into Visual Installer before really, because it is so limited for MSI experts, but after taking a quick look there is a .vdproj (project file) created with VS 2010, and not very surprisingly, all the MSI information is coded there. The visual setup editors you can see in the solution explorer are only a subset.
Just look for "ARP" and you will find some properties set. The meanings of the values are maybe not so easy to guess, but from a rational point of view:
Either there is some setting inside there or a custom action (listed there too) which sets that property!
In my minimal test with the wizard only the ARPCONTACT property was set in the resulting msi file.
At least you could take the .vdproj file cor diffs with other checkedin versions..
I made a little app with c# which I wanted to send to a friend to get an opinion. Problem is when I selected release configuration and click rebuild I get 7 additional files(3 dll's, 1 exes,...) along with the exe I want. Am I doing something wrong? I used to get single .exe files back when I used c++ with VS 2005.
You are not doing anything wrong. Its just that at release additional files are generated like AppConfig.xml for instange that holds your application settings, or a ClickOnce deployment package so that your friend can install the app. To get more used to c# you can start by googling articles about the differences between debug and release
Have you considered using the Click Once facility built into Visual Studio 2012?
Click Once Deployment - MSDN
Click Once will generate an installer that will that your friend can execute. It will automatcially download and install any dependencies (such as a specific .NET Runtime) if necessary.
To distribute referenced DLLs look at the following URL as it suggests the correct configuration settings:
How to: Specify Which Files Are Published by ClickOnce
It's been an horrible hour. Couldn't get Clickonce working for such a simple app. Moving just the 3 referenced dlls and the exe to another folder worked. Wix on the other hand...is difficult to say the least.
However, this allowed me to create a single setup file if not an exe in 10 mins. I sent a shortcut to the desktop which is more or less what I want.
How do I use Visual Studio to develop applications on Mono? Is this possible?
You just build the applications in Visual Studio, and run them under Mono instead of under .NET. The binaries should be compatible... but you'll need to make sure you don't use any libraries which aren't available in Mono - see the Mono Application Compatibility Guidelines.
(According to that page, you need to turn off incremental builds in Visual Studio though - a point I wasn't aware of before :)
See this article on how to run your apps while targeting the mono framework from VS.
Miguel has posted this entry a while ago, so it's quite dated. You can also try this and this (all hail Web Archive!)
Since version 2.0 MonoDevelop supports VisualStudio project/solutions file format. This means that you can use the same code base on Windows with VS and .Net and on Linux with MonoDevelop and Mono. That in my opinion is the best way to go about it. There are no major reasons to run application in Mono on Windows, other than for testing purposes and for that I'd rather set up a virtual machine to test the software in native environment.
I've posted an article on how to integrate Mono 2.8 (the build for .Net 4.0) into Visual Studio 2010 here - there's a link there to another profile built for Mono 2.4 (.Net 3.5) if that's what you're aiming for.
You can integrate the new Mono 2.8 profile with 3 simple steps:
Download the profile itself from here.
Unzip the contents of the profile Zip to one of the following directories:
32-bit systems: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile
64-bit systems: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile
The "Mono" folder in the ZIP should be directly under the "Profile" directory.
Restart Visual Studio if it had been running, open the properties of the project you want to use with Mono, and select the Mono Profile for 2.8:
Note: You will not be able to select the Mono Profile straight from the New Project dialog box; for some reason, that list of profiles doesn't match. Create your project as a .Net Framework 4.0 project first, and after creation set the project properties to Mono.
If you've upgraded your MonoDevelop install to the latest version (as of today, anyway), this Visual Studio solution & Project file will open with no problem - no changes required at all.
If you encounter the problem that you need .NETFramework,Version=v4.0,Profile=Mono in order to run the application, the trick was to create registry key.
For running Windows 7 x64, it was: HKEY\_LOCAL\_MACHINESOFTWAREWow6432NodeMicrosoft .NETFrameworkv4.0.30319SKUs .NETFramework,Version=v4.0,Profile=Mono
I suppose for x86 it’s HKEY\_LOCAL\_MACHINESOFTWAREMicrosoft.NETFramework v4.0.30319SKUs.NETFramework,Version=v4.0,Profile=Mono
(Where v4.0.30319 would be the version of the current 4.0 framework installed.)
Yes, you can develop on Visual Studio and target Mono (Mono for x86).
Here is an answer I made on all the available possible alternative to compile against Mono on Windows. However, it's focused for Mono x86.
As a summary, let's list the possible choice for VS development:
MonoHelper addin
Mono Profile
For Android/Ios, you can also cross-compile and debug inside Visual Studio with Xamarin addin. Although it's not free for commercial huge applications, there a free version available to make small ones.
Note: For those who wonder why in the world I would like to develop in Visual Studio on Windows, instead of MonoDevelop on Unix, let say that developer experience in MonoDevelop does not compare to VS one (especially when it comes to debugger/refactoring, the last due more to Resharper than to VS itself).