When I use the Setup and Deployment Wizard project, it never manages to match the .NET Framework I have selected. I get the following warning:
Warning 2 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#).
I suppose if I used just the .NET Framework Client Profile, it would work, but I usually pick the .NET Framework . I've talked about using this installer in two previous posts, one that covered the basics, and one that covered some more advanced concepts. With a little luck the third time is the charm.
The fix for this warning is fairly easy to implement once you know where to look. First open the properties for your installer project by right-clicking on the project in the Solution Explorer. You should get the following dialog:
Make sure the items clicked here match what you selected on your main project Verify by right-clicking on your main project, select the Application Tab (the top one) and look at the Target framework: popup selection.
But you're not done yet.
The final piece of the puzzle requires that you right-click on your installer project again and this time use the View Menu and select the Launch Conditions option. That window will open in the content area.
Select the .NET Framework as shown; and then in the properties pane use the popup for Version and select the matching .NET Framework. Rebuild and Bob's your uncle.