Change clickonce prereq's - visual-studio-2010

So I migrated from VS2008 to VS2010 with my clickonce application. I use to have the 2008 C++ redist as a prereq for my application. Upon moving to VS2010 that option no longer exists and the 2010 C++ redist will not do. I have successfully been able to re-add the 2008 redist into the Visual Studio 2010 prereqs list.
My question is, if I now make the 2008 C++ redist a prereq again, will that break my clients? My clients already have the 2008 redist installed.
Thanks much

No, it will not break your clients, as long as you are targeting the same framework version you were with VS 2008.
The prereq installer, usually called the bootstrapper, is completely separate from ClickOnce. It "bootstraps" together prereq installs to make the experience nicer for end users. That's it. It doesn't do anything special other than download and kick-off all your prereq installs and then launch your ClickOnce app when it finishes.
Now, if you upgraded your app to the 4.0 Framework and a client without the framework runs your app, you're in for some trouble. This is a different issue than your C++ runtime prereq though.

Related

Does MSbuild require Visual Studio to be installed on the build server?

Can we use MSBuild without Visual Studio 2012?
Currently, we have a build server where we are compiling and creating deployment copy of one of our projects, it has Visual Studio Professional Edition installed. We are setting up a new build server now. Do we really need Visual Studio 2012 on the new build server?
If yes, then how? I googled it but I couldn't find an answer.
We have spent a lot of time trying to get our Build Servers to work without Visual Studio.
We do not use TFS for builds and therefore I am not sure the license exemption above applies to us. Also not having Visual Studio installed helps you really understand how your software is building and get references correct.
We have seen many examples of solutions with projects that contains references for the same piece of software with some in nuget packages shipped with the solution and others that are pointing to locations in the "program files" path which are not present on machines without Visual Studio installed. Once you attempt to build software without VS installed you can really see how "self-contained" your applications are.
Before I start listing the things you typically need to install, let me just point out that MS Build is now no longer considered part of the .NET framework but is shipped with Visual Studio but can also be installed separately. See this blog post for more: http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx
The following software needs to be installed for most builds, there may be others for example if you are creating portable class libraries.
Microsoft Build Tools 2013
Web Deploy 3.5 (for packaging applications)
Microsoft .NET Framework 4.5.1 Developer Pack
Microsoft .NET Framework 4.5.2 Developer Pack
Windows Software Development Kit (SDK) for Windows 8 (You can use the SDK to build applications that target these operating systems: Windows 8, Windows 7, Windows Vista, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008)
The following directories need to be copied:
Reference Assemblies (need to be copied from a machine running Visual Studio from/to directory C:\Program Files (x86)\Reference Assemblies)
Public Assemblies (need to be copied from a machine running Visual Studio from/to directory C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies
We also use Wix and therefore we install the following:
WIX Toolset 3.8
I have a similar set for testing however that was not part of the question so I will leave that off!
Hope this helps someone.
Update: 3rd March 2017
Microsoft recently responded to a long standing user voice request "Support .NET Builds without requiring Visual Studio on the server" for the requirement for Visual Studio to be installed on a build server to be removed.
From the description on the download page "These Build Tools allow you to build native and managed MSBuild-based applications without requiring the Visual Studio IDE." Not tested yet but after RTM I will look at this and provide a further update here.
There is a blog post that promises these build tools install all pre-requisites and can be used to build MS Build based applications.
No, you don't need Visual Studio on your build box. If I recall correctly, msbuild is installed as part of the .NET framework - it certainly used to be.
Depending on what you're building, you may find that there are some things which are easier to get working if you do install Visual Studio though - things like portable class library profiles. While there are usually non-VS installers available, I've found it simpler to install an Express edition of Visual Studio just to get the bundled build targets.
Remember: The easiest way to build your visual studio solutions is to install Visual Studio on the build server. Even Visual Studio Express is often enough.
That said, you can make it work without it. But it it sometimes a lot of work to figure out. You'll need to install the right Windows / .NET Platform SDK. You can install multiple of these SDKs side by side. Now, when you depend, for example, on ASP.NET MVC 5 or Entity Framework 6, you might need to install further SDKs to get your application to compile. The downloads for these all assume that you also have Visual Studio installed, but many of their payloads can also be installed separately. It can become quite a hassle.
Personally I've grown tired of trying to figure out which parts of which installers enable what. But that is also driven by the fact that Microsoft allows you to install Visual Studio on a build server (TFS) with the same license as your development machine as long as you are an MSDN subscriber. Check the Visual Studio License Whitepaper for more details.
Using Visual Studio on the Build Server
If you have one or more licensed users of Visual Studio Ultimate with MSDN, Visual Studio Premium with MSDN, or Visual
Studio Professional with MSDN, then you may also install the Visual Studio software as part of Team Foundation Server
2013 Build Services. This way, you do not need to purchase a Visual Studio license to cover the running of Visual Studio on
the build server for each person whose actions initiate a build.
If you, like me, would prefer this to change in the future, I suggest you make sure you're heard by submitting your request or voting for an existing one over at the Visual Studio User Voice.
Here's just a quick take on this.
Your build machine should decouple development tools as much as is possible. With that said, and as already stated by others here, MSBuild can be run independently of Visual Studio, and it should!
If your build requires Visual Studio to run then there is a very good chance that you have a solution or project architecture problem that ought to be resolved.
Visual Studio doesn't need to be installed. MSBuild is part of the .net SDK.
Other .net dependencies will need to be installed though, if you are using them. MSTest, or anything that is part of Team foundation will require Visual Studio installed.
I believe you only need MSBuild ( that is part of the .NET framework you're targeting ) .
Make sure you install the proper .NET distribution
the following is a good place for build servers it have the developer tooling.
The .NET Framework 4.5.1 Developer Pack installs the multi-targeting pack for .NET Framework 4.5.1. Developers can build applications targeting the .NET Framework 4.5.1 using either Visual Studio 2012 or third party IDEs. You need to download the web installer instead of this package if you intend to redistribute .NET Framework 4.5.1.
http://www.microsoft.com/en-us/download/details.aspx?id=40772
Best of luck.
C++ :
There is a "Build Tools" that contains MSBuild, Visual studio is not required.
From the official doc :
These tools allow you to build C++ libraries and applications
targeting Windows desktop. They are the same tools that you find in
Visual Studio 2015 in a scriptable standalone installer. Now you only
need to download the tools you need to build C++ projects.
Managed :
The same applied : Build Tool Managed

Using a v90 Platform toolset on VisualStudio 2010

In our company for software development we are mainly using VisualStudio 2010 (Platform toolset v100).
We ran into a situation where we needed to work with some poorly organized third party SDK that was compiled using VisualStudio 2008 (V90) and this SDK can't function normally while working in the "v100" platform toolset.
What I mean by "poorly organized" is.. imagine for example an SDK export functions that has something like a "std::string" in it.
The solution was to create a "wrapper" dll that we compiled using VS2010, but with a "Platform Toolset v90" option. But for "Platform Toolset v90" to work, we needed to install a VisualStudio 2008.
My question is: Is there any legal way to use v90 platform toolset in VS2010 without buying VisualStudio 2008? Maybe there is some kind of v90 "toolset package" or something that we could use?
Thanks.
As user1240436 stated in his comment, it should also be possible to install the Microsoft Platform SDK. I think v6.0 and higher contain the VC 9.0 and its environment.
As far as I know, it should be possible to use the Visual C++ 2008 Express Edition
It just has to be installed on the compiling machine, everything else could be done via VS2010. (This way you could also build multi project solutions etc)

installer prerequisite in VS2010 Setup Project

VS2010 Setup project, Excel AddIn, C#, ExcelDNA, NetOffice
I use VS2010 setup project to create installer.
Click Prerequisite properties of the setup project, I see Windows Installer 3.1 and Windows Installer 4.5 are listed in prerequisite list.
In VS2008, I checked Windows Installer 3.1 in prerequisite (though I do not know why?).
In VS2010, I wonder maybe I should check windows installer 4.5 in prerequisite list.
I wonder if I need check it and why?
Another thing is Shared Add-in support Update for Microsoft .NET framework 2.0 (KB908002) is listed in prerequisites list, too. Wonder if I need it? My AddIn is target .NET 35 Sp1
My addIn target .NET framework 3.5 sp1 in VS2008, now I move to VS2010, in setup project, I can check either .NET 3.5 SP1 or .NET 4.0 as prerequisite. Does my target .NET framework have to be the same version as that in prerequisite list?
In VS2010, I wonder maybe I should check windows installer 4.5 in
prerequisite list. I wonder if I need check it and why?
You should check it only if you need to use Windows Installer 4.5 features.
Another thing is Shared Add-in support Update for Microsoft .NET
framework 2.0 (KB908002) is listed in prerequisites list, too. Wonder
if I need it? My AddIn is target .NET 35 Sp1
You should answer this question. Does your add-in need it in order to work correctly? Did you add a .NET Framework prerequisite which includes this update?
Does my target .NET framework have to be the same version as that in
prerequisite list?
It's the other way around. First you determine the .NET Framework version your add-in needs and then add it as a prerequisite.

Setup project with crystal reports and VS2010 fails to register crystal dlls

I built some crystal reports in VS2010, and made a setup project for it. It deploys fine on my dev machine, but I get the following error while trying to install it on the client machine.
I have googled this error for sometime and found that the VC++ 2005 redistributables are a prereq. I have added these merge modules to my setup project but I still get the same error.
I have also added .NET 4.0 as a prerequisite, and still get the same error. Anybody has any ideas?
My dev machine is running Windows 7, and I am trying to deploy it on a Windows server 2008 R2 machine.
For anyone else's reference, I ended up adding Crystal Reports Runtime Engine for .NET 4.0 as a prerequisite and just make the user download it if they dont have it installed. I also had to add a .NET 4.0 prerequisite (not the client profile) and of course the merge modules (CRRuntime_13_0.msm). If anyone has a better way of getting this to work, I am still interested. Thanks!
Try this one
http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp
I installed CRRuntime_32bit_13_0_8.msi on 64bit and finally worked
The merge modules you have added are from VC++ 2008 redistributable, not 2005.
You can download the correct redistributable from the following link:
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
That contains the required Microsoft_VC80_CRT_x86.msm, Microsoft_VC80_MFC_x86.msm, Microsoft_VC80_ATL_x86.msm and Microsoft_VC80_OpenMP_x86.msm, as noted here.
AFAIK, There's no need to .NET 4.0 as a prerequisite, at least for Crystal Reports Runtime for VS 2010. The above redistributable added to the setup project, all that error messages are gone.
NOTE:
To add the VC++ 2005 redistributable to the VS setup project, a corresponding bootstrapper package should be added in the following folder (for VS 2010):
%Program Files%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
Or %ProgramFiles(x86)% folder on 64-bit Windows.
UPDATE:
To create a prerequisite bootstrapper package, see the following links (borrowed from here):
Deploying Custom made Visual Studio prerequisites using Bootstrapper Manifest Generator
Creating Bootstrapper Packages

If I have Both Visual Studio 2008 and 2010, do have I have to keep both

I recently downloaded VS 2010 trial, the new version is more easy to use.
I have VS 2008 installed, If i decide to use VS 2010 in the future, do I still have to keep VS 2008? Is there any compatibility issue with it?
You would need to keep VS2008 installed if you target Windows CE (via Compact Framework, native smart device projects, etc.)
http://msdn.microsoft.com/en-us/library/sa69he4t.aspx
Also if you want to write native applications that run on versions of Windows before XP SP3 and Server 2003 SP2, this is no longer possible with VC++ 2010. The same applies to managed code written for the .NET Framework 4.0, but you can still use Framework 3.5 with VS2010 for projects with managed code only.
And Intellisense for C++/CLI code is gone (MS promises to remedy that in the future, whether a service pack or the next version I cannot say).
If you open a VS 2008 solution or a project in VS 2010 it will be converted to VS 2010 and you will not be able to open it in VS 2008.
If that is not a problem then you don´t have to keep VS 2008, unless you are using a addin or some other third party application with VS 2008 that is not compatible with VS 2010.
Edit:
Look at Ben Voigt´s answer for information for which version have support for different platforms.
VS2010 allows you to specify the target framework that you'd like to develop on. There should be no reason to keep VS2008 installed unless you've become accustom to some handy plugins :)

Resources