The short answer is: You can't. It is handled through the prerequisites. If the application requires .NET 3.5 SP-1 and it is not installed, the application will not run.
Can't you have your users install the application using the setup.exe the first time, and then link to the .application file after that?
RobinDotNet
Click here to visit my ClickOnce blog!
Kind of defeats the purpose of having an online application, no?
Is there a way to programatically determine if 3.5 SP1 or higher is installed?
EDIT: Insert the following Module and call FrameWorkCheck_35SP1 to determine if 3.5 SP1 is installed. This uses a delegate function just introduced in SP1. Kind of a kludge, but there it is.
Module ExtensionMethods
Private EmptyDelegate As Action = AddressOf EmptyMethod
Private Sub EmptyMethod()
End Sub
<System.Runtime.CompilerServices.Extension()> _
Private Sub Refresh(ByVal uiElement As UIElement)
uiElement.Dispatcher.Invoke(EmptyDelegate, Windows.Threading.DispatcherPriority.Render)
End Sub
Public Function FrameWorkCheck_35SP1() As Boolean
Dim retVal As Boolean = True
Try
Dim x As New TextBox
x.Refresh()
Catch ex As Exception
retVal = False
End Try
Return retVal
End Function
End Module