I am upgrading lots of C# projects from vs.net 2008 to vs.net 2010 rc. I notice that the upgrade creates a BootstrapperPackage section inside the *.csproj file (include Microsoft.NET.Framework.3.5 and 3.5sp1). I wonder what the BootstrapperPackage does and do I need them?
Bootstrapper packages are the basic components you might need to get a .NET program installed. You'll find them listed in the BootsTrapper\Packages subdirectory of the Windows SDK folder (c:\program files\microsoft sdks\windows\v6.0 for VS2008). The ones on my machine are:
DotNetFx(Xxx) - installs .NET on the target machine
Office2007PIARedist - the Office PIA, required when you automate Office programs
ReportViewer - required when you use report viewer
Sql Server Compact Edition - required when you use SQL Server Compact
SqlExpress - required when you use SQL Express
VBPowerPacks - required when you use any VB Power Pack component (PrintForm, Shape etc)
vcredist(Xxx) - required when you used any C/C++ code that uses /MD
VSTOR30 - required when you used VSTO
WindowsInstaller3_1 - installs MSI 3.1 (don't ask)
Making sure that .NET is installed isn't really necessary anymore today. The rest of them might however be required, even if this is a CO install. I think a Setup project can autodetect them reliably.
<BootstrapperPackage> is the item name for parameters to the BootstrapperItems parameter of the <GenerateBootstrapper> task, in the default project configuration (ie: Microsoft.CSharp.targets). Check here on MSDN for the documentation.
(So the name "BootstrapperPackage" is arbitrary - which is why documentation for it is difficult to find.)
The GenerateBootstrapper task creates a "setup.exe" that checks for and installs the specified prerequisites before launching another application. Typically that other application will actually be a ClickOnce manifest describing how to install your program.
(The ClickOnce manifest gets opened by Windows Installer, which is why you'll typically have that as one of the prerequisites.)
OK Found a link. It has something todo with ClickOnce and nothing I need to worry about, I think.
Related
I have an old webservice installer built on .netframework 4 which is running on Windows 2008 and when i try to install the installer on Windows Server 2016, i am getting the below error.
Error Message : "This setup requires Internet Information Server 5.1 or higher and Windows XP or higher. This setup cannot be installed on Windows 2000."
Is it possible to run this old webservice installer to the new 2016 without rebuild my solution?
LaunchCondition Table: Most likely there is an entry in the LaunchCondition table of that MSI - if it is an MSI - which prevents installation. I say most likely because it could also be a custom action - please check the launch condition table first and get back to us. Launch conditions must evaluate to true for the setup to allow itself to be installed. You can "hotfix" this by using a tool capable of writing to MSI files: How can I compare the content of two (or more) MSI files?
You are supposed to make a transform file *.mst (a database fragment) and apply it at installation time to change the original MSI installer. However, sometimes I make backups of the original installer and zap simple stuff like launch conditions if they are wrong in the first place. A transform becomes too cumbersome for ad-hoc stuff. But should be used if you intend to distribute through SCCM etc...
Compatibility: Even if you hotfix the MSI file and it installs you obviously won't see the webservice working if there are technical reasons why it won't work on that machine. Launch conditions are a sign that something must be present on the machine for the application to work. However, sometimes people are a bit trigger happy with their launch conditions and make packages that are a bit too restrictive.
Note: first check if IIS is installed on the box.
I have a standalone tool developed in C# Visual Studio Express 2010.
My problem is that this tool will fail to start on machines having no .NET installed, and asking for .NET 4 on machines has .NET under 3.5 or lower.
What I basically want to do is to install .NET 4 from my application before the main script runs. I can write a program to download it from an official webpage, also to run the installer etc. But the main problem still exists, the app won't even reach the download part as it won't run on machines...
I've googled around and found that you can include dll-s etc., but I still doubt I can proceed without a proper .NET installation. So how can run dotnetfx.exe with my .NET dependent application?
Your attention and ideas are much appreciated.
Cs.
Use ClickOnce - it takes care of dependencies when configured correctly and comes integrated/free with VS.
EDIT: So vs express editions don't support setup projects. Plan B: wix.
simple. your installer must not be a .net application. just write your own c++ version or use some existing application. here is a link to show you how to do silent installs of .net 4. just include the setup application with your program. I would be very surprised if some of the msi installer tools out there do not have .net installation support.
http://blogs.msdn.com/b/astebner/archive/2009/04/16/9553804.aspx
I am working in .net 4.0, I need to create deployment setup in visual studio 2012 with all prerequisites like .netframework 4.0,sqlite etc.
when i create the setup in english (default), it is working good, means it is installing all the things properly on client machine.
But when i change the default language to french, it give an error
1: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX40\dotNetFx40LP_Full_x86_x64fr.exe' in item 'Microsoft .NET Framework 4 (x86 and x64)' can not be located on disk. See Help for more information.
2: General failure building bootstrapper
3: Unrecoverable build error
Please help me, how can i remove this error.
Another thing is that when i change the settings for prerequisites like "download the prerequisites from the vendor's website", then it does not give an error.
But i need to install from local disk/folder including in setup folder.
It is necessary to place the file into the proper language directory.
Here, you're missing the \fr part in your path.
So you must place the file dotNetFx40LP_Full_x86_x64fr.exe to directory c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\fr for 64 bit windows or to c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\fr for 32 bit windows.
Firstly, thanks for taking the time to read and possibly comment on this question.
Summary
How can I use MSBuild to automatically package MS Visual Studio Windows Services and Windows Applications into simple (a directory of files including the dlls, exes, configs etc) which I can release to our Dev-Ops dept. I do not want the distribution in MSI installer or setup.exe or some web deployment format which appear to be the default in MS Visual Studio's publish.
My Environment
Windows XP SP3 (32-bit), Window Server 2008 R2 (64-bit)
.NET 4.0 (32-bit)
MS Visual Studio 2010 (32-bit)
NAnt 0.91 (32-bit)
My Scenario
Currently, we have about 5 types of MS Visual Studio project and for the first 3 types (Web Services, Web Applications, Web Sites), we can use MSBuild to package the source into a simple directory of files (distribution) based on the contents of the csproj file using:
msbuild my.component.csproj /p:Configuration=Release /t:Package /p:_PackageTempDir="C:\temp\some\dir"
For the latter 2 types (Windows Services, Windows Applications), we cannot use MSBuild as above. From investigation via the Publish command in Visual Studio, it appears that I can create setup.exe installers for both Windows Services and Windows Applications but this is not what I want - I just want to be able to create a simple directory of files (distribution) as I have been doing for the other project types. I accept that this may not be possible but I would just like to know for sure.
Conclusions
Thus far, for both Windows Services and Windows Applications I have come to the following conclusions, the former two, not ideal:
Use MSBuild to compile the code and NAnt to create the simple directory of files (distribution).
Use MSBuild to compile the code and create a post build event to create the distribution.
Your suggestion here (much appreciated).
First, .Net managed Windows services, just as their unmanaged counterparts, must be registered with the Windows Service Controller via a command line tool called InstallUtil. There are different versions of this utility for the various .Net Framework versions. You will find them where the .Net framework gets installed. On my development box, for example, they are located under the individual framework subfolders of C:\Windows\Microsoft.NET\Framework.
Second, perhaps you could clarify what specific problems you are seeing with the Windows Application distributions. These are normally as easily done as simple file distributions as web sites and web services are.
You can run MSBuild to get what you want, you just need to specify a different target than Package. I believe you want `Build':
msbuild my.component.csproj /p:Configuration=Release /t:Build
You can customize the build output directory via a property, but I can't remember off the top of my head what that property name is. If you crack open your csproj file, you should be able to see it.
Based on my research online (MSDN), at StackOverflow and limited local experimentation, it appears that both Windows Services and Windows Applcations cannot be quickly or easily built in a way which is similar to the distribution output of MSBuild's package command, that is, into a local file-based distribution.
For Windows Applications, as Splattered Bits suggested, the contents of the release bin directory can be used as the simple file-based distribution after the project has been compiled.
For Windows Services, it is be possible to do what we did for Windows Applications above and use the output from the release bin directory.
In both cases, a change to the CSPROJ file may be required to suppress the creation of PDB files or futher configuration the compilation output.
I have a winform solution that I deploy through clickOnce. There is the Main Project and then a Project called psWinForms. That project has a Reference to Microsoft.ExceptionMessageBox that I use in my custom error reporting.
I have psWinForms as a reference in my Main Project with Copy Local = True.
I have Microsoft.ExceptionMessageBox as a reference in psWinForms with Copy Local = False & Specific Version = False
In Application Files I have Publish Status =Prerequisite(Auto)
I have tried various combinations to no avail.
I looked here on the Test System on the DLL is there.
C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies
I am using the ExceptionMessageBox from SQL version 9.0.242.0 if that makes a difference and the users only have SQL 2005 Express(9.0.1399.0) installed.
So I am very confused as to why my app hangs when I try to throw an error using this....
You can't copy and deploy the assembly yourself, it has to be installed as part of the SQL client components. There are different client components for SQL 2008 and SQL 2005, your application has to reference the proper one. So you'll have to ship two different applications, one compiled for SQL 2005 and one for SQL 2008 and your users will have to install the proper one. From Deploying an Exception Message Box Application:
The exception message box is installed
by Microsoft SQL Server and is
supported for use in your custom
Windows applications to improve
exception handling. Because the
exception message box is installed by
all editions of SQL Server except SQL
Server Compact 3.5 SP1, you can use it
with no additional configuration on
any computer on which SQL Server
client components, including the SDK,
have been installed.
While technically is probably possible to deploy the assembly and add it to the GAC yourself is a bad practice as your dll will not be part of the normal chain of service packs and cummulative upgrade patches.
Also you better clear up with an MS representative whether deploying this dll standalone is OK with the SQL client usage license or not. Every component that can be redistributed under the license has an install msi available for developers to distribute. If this dll does not is a strong indicator that is not allowed to be redistributed by 3rd parties (you).
Update
There is actually a distributable msi (SQLServer2005_EMB.msi, SQLServer2005_EMB_x64.msi) for the ExceptionMessageBox component:
In SQL Server 2005 SP1 and later
releases, the exception message box is
also provided as a redistributable
installation program that you can
distribute and deploy with your
application... The redistributable
installation program for exception
message box is available online as
part of the Feature Pack for SQL
Server 2005 SP1.
do you have the assembly referenced in your MAIN application? I didn't see that scenario listed...I have found that for copy local to work, you need to have all sub-projects references in the main application reference list otherwise you get unpredictable results.
Also if you need your specific file to be used, make sure use specific version is true.
the same goes for App.config sections...if you have project level appconfigs you have to merge that with the application level app.config.