I have a simple setup project made in VS2010. One executable, a few dlls, very plain.
I move my setup.exe and .msi to a clean test machine, and after starting setup.exe, I get a EULA for .NET 4, then ".Net Framework 4 Client Profile (x86 and x64)" is downloaded and (supposedly) installed. The setup asks for a reboot, I reboot, then finally my application can be installed. I start it, and then I get this window:
Clicking yes takes me to this page.
Installing .NET Framework 4.0 seals the deal, no reboot required this time.
All built DLL's and the EXE have .NET 4 as the target framework in project properties (no Client Profile), except one DLL which has .NET 3.5
Why the double installation? How do I make it install once in the wizard?
There's a warning on the setup creation (silly me, didn't see that!):
The target version of the .NET Framework in the project does not match the .NET Framework launch condition version '.NET Framework 4 Client Profile'. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#).
This place has the answer:
1) select installer project
2) click on the icon on top "Launch Conditions Editor" its the icon with a binoculars.
3) Under Launch Conditions, Select ".Net framework" on the right in "Properties" Select "Version" you will see a drop down. change the framework to your target framework.
UPDATE
By default, it seems, a setup project is made with .NET Framework 4 Client Profile, and it has to be changed to "no profile" in two places. The one mentioned above and in the setup project's properties.
Select installer project
Go to properties (right click -> Properties)
Go into Prerequisites...
Uncheck "Microsoft .NET Framework 4 Client Profile (x86 and x64)" and check "Microsoft .NET Framework 4 (x86 and x64)"
I expect some of your projects are set to use the .NET 4 client profile, and some are set to use the .NET 4 profile. Check each project, set them all to .NET 4, and rebuild the solution.
Related
I'm making a setup program for an app I wrote. I'm using the Visual Studio setup template, using InstallShield. The wizard (not Merlin, unless it's Olsen, maybe) asks me about required software:
My app is built on a machine with both Windows 7 and Windows 8.1 installed. The app uses .NET Framework 4.5
Do I need to select "Microsoft .NET Framework 4.5 Full package" in the "Project Assistant > Installation Requirements" section of the Installshield wizard above, or...???
The answer will be in your WPF project settings and app.config. WPF was released in .NET 3.0 as I recall so you might be targeting 3.0, 3.5, 4.0 client, 4.0 full, 4.5 (full) or 4.5.1. If 3.0 or 3.5 you might have an app.config that says run on CLR 2 or 4. From there you tell InstallShield what kind of gate checks it should perform (if any). It might not be the end of the world if you just install the app and when you click the shortcut you get a friendly message telling the user what version to install.
I have a visual studio install setup project in which I want to specify that pre-requisite is .Net 2.0
When I click properties-> pre-requisite
it shows only .Net framework 3.5 / client profile and .Net framework 4.0/client profile and other components but not .Net 2.0
The second part is will the installer fail if pre-reqs are not met or install them automatically ?
Thanks,
If you look in the properties for the solution you can select which version of the .NET framework you use. Note this is for the non Express versions only.
http://msdn.microsoft.com/en-us/library/bb398202.aspx
Furthermore Microsoft keeps itself in business by only making VS backwards but not forwards compatible with future .NEzt versions.
To create an installer you needmtomcreatemamDeployment project and specify the dependendcies.
http://support.microsoft.com/kb/324733
I'm having trouble creating a sharepoint project with .net 4.0.
Using Visual Studio 2010, when I attempt to create a new "Empty SharePoint Project", I select ".NET Framework 4" under the .net version dropdown list (actually it's the default selection), and then i click ok. When I look at the "Target framework" property in my package properties, it says ".NET Framework 3.5" and does not list any other versions.
I have assured that .net 4.0 is installed, and I even have another Class Library project under the same solution with version 4.0. I also tried it on a different machine, and the same thing happened. What is going on?
screenshots:
creating a new sharepoint project
newly created sharepoint project properties
other class library project in the same solution successfully using version 4
SharePoint 2010 is built to use v2.0 of the .NET CLR (which is used by .NET Framework 2, 3 and 3.5). .NET 4 uses a different CLR and thus is incompatible with SharePoint insofar as developing solutions to run inside SharePoint.
You can build .NET 4.0 applications that call SharePoint's web services, use the client object model, or even run under a virtual directory under SharePoint. But you're stuck using 3.5 for an actual solution.
Fairly self-explanatory. I have recently installed .NET framework 4 and VS2010 but I want to compile my 3.5 projects using 3.5 as 4 has not yet been installed on our production servers and I get "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." if I try
All project types have the target framework dropdown greyed out
Make sure that your registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\OnlyUseLatestCLR
and
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\OnlyUseLatestCLR
are set to 0 (not 1).
This fixed it for me since applications like VS2008 are no longer forced to use .NET 4.0 runtime. I had previously set these registry keys to allow Powershell run inder .NET 4.0, however, a config file should be used for that instead.
This has something to do with .NET 2.0 assemblies (i.e. mscorlib) being removed from GAC.
I managed to fix this by first uninstalling .NET framework 3.5 and 4.0 from my Windows 7 using .NET framework cleanup tool:
http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx
And then reinstalling both frameworks (first 3.5, then 4.0) from the web. Now the drop-down has options again in VS2008 and I can multi-target 3.5 framework from VS2010.
Using VS 2008
I created a setup file for my Project, I run the setup file in my system, and My Project is working fine.
If I install my project to another system, is asking .Net Framework 3.5 at the setup time.
.Net Framework 3.5 is needed for installing my Project?
Before i installing my project, i install the .net framework 3.5, It taking to much time to setup?
How to solve this? or any other way to create a Project setup ?
Can any one help to solve my setup problem.
What you need to do is right click on the setup project in the SolutionExplorer and select the Properties menu option. You can then click on the Prerequisites button. This allows you to control what your setup program needs/wants in order to install your code.
If you don't need .NET 3.5 then just unselect it. This is just one more annoying thing that VS2008 does, you select .NET 2.0 as your target framework but it leaves .NET 3.5 as a pre-req.
If it is important for you that your program does ot require .NET 3.5, you can set up your project to target .NET 2.0. The the setup project will also see this, and (hopefully) remove the dependency when you update it.
If your project is VB.NET, you can set the Target Framework version here:
Project Properties -> Compile -> Advanced Compile Options...
If Your project is C#, it is here:
Project Properties -> Application
If you do this, of course you will not have available any .NET 3 specific functionality.
Do you rely on .net 35 features in your code. If not you can recompile with the project settings targetting .net 3.0 or 2.0.
The .NET 3.5 framework has two different installers to choose from: the bootstrapper and the full package.
The bootstrapper installer is small in size (2.7 MB). It's small because it downloads the required files from the internet when executed on the target machine. Depending upon the target's network bandwidth, it may take a long time to run.
The full package installer is large (237 MB), and does not require an internet connection to run.
If you are currently using the bootstrapper installer, you should try downloading the full package installer and running that on the target machines.
(That is, if you actually need .NET 3.5)
You can select either installer from here.