Way around deploying prerequisites for Winform code - winforms

Currently I have a 60MB assembly which needs a 100 MB of prerequisites to be installed. For example Visual C++ 2005 for Crystal reports, Visual studio Tools for Office 2010 , Visual C++ 2010 redistributable and finally .NET framework.
Is there a way through which I don't need to deploy these prerequisites, inturn saving time and space?
May be there is a way to extract and include only those parts within these prerequisites which are needed.

With certain exceptions, MSFT generally doesn't support this. Using high level languages, frameworks, APIs and such come with a cost. You don't get all that for free... it has to be deployed.
That said, you can make choices to make it more manageable. You can target .NET 3.0+ and eliminate Windows XP and the .NET Framework suddenly doesn't need to be distributed.
You can also choose not to redistribute them and instead have your installer simply error out and tell the user to go install it.
It's one of those "it is what it is" problems.

I believe there are merge modules for CR for VC++ 2005 that you can include in your MSI build, but that redist isn't huge anyway. I also believe you don't need to install Visual Studio Tools for Office 2010 either, you need the Visual Studio Tools for Office 2010 Runtime Redistributable, not the same thing. The VC++ 2010 redist isn't that huge either, but again there are merge modules you could include in your MSI. I also suspect that you don't need the entire NET Framework, just the Client Profile redist.

Related

How can I install SSDT for use in an enterprise without a license (i.e. for free $$$)?

I want to create a SQL Database project and manage my database as code (e.g. DevOps), but I am not sure what tools I can use for free within an enterprise.
How do I install and use SSDT without requiring paid licensing and violating any EULAs, such as Visual Studio Community Edition's?
In enterprise organizations (meaning those with >250 PCs or > $1M in annual revenue) no use is permitted...
This Microsoft article states that I can use SSDT in VS2019, but it doesn't tell me how to install it and not violate EULA.
This SSDT Download page is unhelpful and does not provide anything about licensing.
Also, I considered other tools, but looking at docs they don't seem comparable to SSDT:
Azure Data Studio - (cross-platform) new preview extension SQL Database Project supports DACPAC. I wasn't happy with my previous trial of this product. Maybe I'll give it another try in a couple years.
VS Code: Does not appear to have any extensions that directly support a SQL Database Project and/or DACPAC
Thanks to all of the answers, but I think I found what I was looking for in the Visual Studio Community Edition license: https://visualstudio.microsoft.com/license-terms/mlt031819/
My understanding, is that this allows me to use Visual Studio 2019 Community Edition for SSDT tools in an enterprise setting.
You don't have to install SSDT in Visual Studio 2019, even in Community. Go to new project and type SQL and hit return. It will say something like "SQL Server Database Project". Guess what? That's SSDT. In older versions, it was a separate install. It is now part of the core Visual Studio. And you upgrade it, if there are any, the same way you do anything else.
Already installed Visual Studio? No problem. Reopen the installer and install the data tools. This can be part of the payloads they have (I forget which one, but it has to do with data) or you can click on the tab that allows you to install individual components and search for the SQL tools. Once installed, they are there.
I don't belie you can install using the SSDT separate installer anymore, just like you know handle all of the .NET Core installs in Visual Studio, rather than separate. Kathleen Dollard outlined this in one of her posts last year (not SSDT, but .NET Core, etc.), so it has been a bit more than a year these things got folded into the installer. Core may still allow download and install? Not sure. But SSDT is the SQL project in 2019.
I guess that you can use SSDT anywhere where you can use Visual Studio. In other words, if you can use Visual Studio - you can use SSDT as well. Now the question - can you use Visual Studio? Here is the link to pdf document describing their Licensing policy.
Here is the snapshot from there:
Visual Studio Community 2019 is a free,
full-featured IDE for any developer building non-enterprise apps
across any platform or device. It includes all the capabilities needed
to create compelling non-enterprise applications, including powerful
productivity features, mobile development tools for Windows, iOS and
Android, and access to thousands of extensions.
Who can use the Software
Rights to use Visual Studio Community depend on the customer
segment and usage scenarios as explained below.
Individual developers
Any individual developer can use Visual Studio Community to create their
own free or paid apps. In addition, any number of users may use the
software to develop and test device drivers for the Windows operating
system.
Organizations
• An unlimited number of users within an
organization can use Visual Studio Community for the following
scenarios: in a classroom learning environment, for academic research,
or for contributing to open source projects.
• Any number of users may use the software to develop and test device drivers for the Windows operating system.
•For all other usage scenarios: In non-enterprise
organizations up to 5 users can use Visual Studio Community. In
enterprise organizations (meaning those with >250 PCs or > $1M in
annual revenue) no use is permitted for employees as well as
contractors beyond the open source, academic research and classroom
learning environment scenarios described above
VS Code - is the text/development editor that have nothing for SSDT, you can work with SSDT projects like with files and folders. You won't be able to build/validate/deploy the project.
ADS - the text/development editor that was created on the base of VS Code to work with SQL Server databases. You can do some basic stuff for SSDT projects (build, deploy, compare, add/remove objects), but is not so powerful as Studio SSDT version yet.
Technically you need only MSBuild and SQLPackage to build and deploy dacpacs, so if these tools can be used for free in Enterprise, then you can technically do everything without the Studio, just with ADS or in hard-core way - with any editor if your knowledge is deep enough to generate proper sqlproj (xml) file.

Windows Installer 4.5 Doesn't appear in the prerequisites component list

From Prerequisites on the setup property pages, I selected the option to Download prerequisites from the component vendor's web site
There is no Windows Installer 4.5 in the prerequisites to install option..
because every im installing my setup using the sqlexpr_x64_ENU.exe in custom actions to install, run the setup after the extracting sqlserver it pops up the window says
There is a problem with this Windows Installer package. Aprogram run as part of the setup did not finnish as expected. Contact your support personnel or package vendor
im using VS2017 on windows 10
Exclude MSI Engine: You should not include Windows Installer 4.5 with any package these days. This runtime is from back in the day of Windows Vista - we are long since on version 5. Windows Installer should be deployed only via Windows Update as of today - in my opinion. Leave the runtime out of your setup.
No Concurrency: You can not run an MSI setup from within another MSI setup via a custom action. This is due to technical restrictions. There is a mutex set when an MSI runs its actual installation sequence, and triggering another installation sequence from within it will fail. A similar answer on the topic.
Setup.exe Launcher: What you need is to install your pre-requisites via a setup.exe launcher instead. This runs installations in serial, not in parallel. Which version of SQL Server are you installing? I see only a couple of versions available in the Visual Studio Installer Project launcher.
Other tools have features to allow you to install a setup.exe with embedded packages of various kinds in sequence. I have explained a myriad of times how to do this in previous answers. Here are just a few that I found quickly:
SQL Server named instance with Visual Studio 2017 Installer project (basically exactly the same issue - I suggest WiX the open source, free alternative)
Custom installer for application in Visual Studio 2017 (I suggest WiX and several commercial tools that are easier to use - maybe try to read this one)
Cannot call command.exe(SQL Server Setup.exe) while calling C# CA with parameters
How to create a MSI file which simply copies a directory to Program Files? (tools list)
Combine exe and msi file in one installer
Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable
The general situation:
The problem is not Windows Installer 4.5, it's the fact that you are trying to do a recursive MSI install (the SQL one from inside yours) which is not allowed and will fail.
The MSI 4.5 engine is pretty much obsolete, about 10 years old, and anyway it's not the issue, and it's not clear why you believe it is. But it IS in the Prerequisite list on my VS 2017 setup project prerequisites - see 3 - even though you almost certainly don't need it.
There are some SQL Express options available in the Prerequisites of the VS setup project - right click the project in solution explorer and choose Properties, then Prerequisites.

How to compile zlib into a DLL on Visual Studio 2017?

I have a hard time trying to do something I think is really simple (I must not be the first one to want to do that). I use Visual Studio 2017 on Windows 7 to do some C code, and I need inflate/deflate for zip.
I search a little, and I found zlib. It seem to be exactly what I search: free, cool copyright, no patent and extensively used and tested in other project.
So, I start to download the latest version (zip of 1.2.11) and here I go, trying to "simply" get the DLL.
However, the documentation state that in order to compile "zlib1.dll", I have to use "./contrib/vstudio/vc..", with ".." the right Visual Studio. But I have Visual Studio 2017 and there are only "vc9" to "vc14", "vc14" being Visual Studio 2015.
The doc say that I have to use Microsoft Visual C++ 2015, and indeed, when I force open with vs2017, I have integrity error.
So I try to install MVC++ 2015, but then it say that I can't install it because I already have something (VS2017) installed.
Is there really no way to achieve something so basic, or there is knowledge that I don't know?
Open source projects can be a challenge to build as their support tends to lag well behind the latest versions of Visual Studio. This is one reason why Visual Studio now supports cmake directly.
That said, the easiest way to build zlib for Windows is just use a NuGet package. I personally use zlib-msvc14-x86 or zlib-msvc14-x64 which are binary compatible with VS 2015 Update 3, VS 2017, and VS 2019. They also provide a static library instead of a DLL.

Visual Studio 2015 CE Setup Installer: Redistributable Package

I have my my setup project in (Visual Studio 2015: Community Edition) ready to be built and create my program installer. But, obviously the program will not work on other computers without the appropriate redistributable package installed on the clients computer.
So, I need to set that up in my project but I do not know how. I read in a post on another site that it is located in:
Project>>Setup Properties>>Prerequisites
But, all I just see are selectables for ".net framework" related things. Also, I read that merge modules are not good to use due to servicing issues.
If you have any insight into whether I am needing to download an extension for the correct prerequisite to appear, use merge modules, or something else it will be greatly appreciated!

InstallShield vs Visual Studio

When I deploy my application in VS2010, I see two options: InstallShield LE and Visual Studio Installer. Why are there two options? What is the advantage of using InstallShield LE over Visual Studio Installer?
To update this a little, Microsoft seems to have thrown in the towel on their own installer project type. It is not included in the Visual Studio 11 developer preview, and there are forum/blog posts that indicate this is no longer a supported product. If you are searching for what to use for new projects, I would steer clear of the Visual Studio Installer. Hopefully when VS11 finally is released, there will be a free version of InstallShield included.
These are just default tools that can help you create simple installers for your applications. Most difference are UI related, there's not much functionality in either of them.
If you want to choose a setup authoring tool, take a look at these threads:
https://stackoverflow.com/questions/4621478/what-is-the-best-windows-installer
How to create an installer using Java?
What is the best installer?
There are lots of threads like this which mention free and commercial setup authoring tools.
Basically, if you want a simple installer, you can use Visual Studio setup or InstallShield LE. If you want more advanced features, you need to find a different setup authoring tool that fits your needs.

Resources