Use an installer like NSIS and check for your framework. If its not on the target machine, install it.Here's what I do in NSIS
Function IsDotNetInstalledAdv
!insertmacro MUI_HEADER_TEXT "Checking for prerequisites." "Checking for .net framework 3.5 SP1.."
ReadRegDWORD $0 HKLM "software\Microsoft\NET Framework Setup\NDP\v3.5" "SP"
StrCmp $0 1 skip.DotNet
!insertmacro MUI_HEADER_TEXT "Installing .net framework." "Installing .net framework 3.5 SP1.."
DetailPrint "Proceeding to install dotnet bootstrap installer...."
sleep 1000
MessageBox MB_YESNO|MB_ICONQUESTION "This software requires DotNet framework ${MIN_FRA_MAJOR}.${MIN_FRA_MINOR}.${MIN_FRA_BUILD}.$\r$\n$\r$\nDo you wish to install it now?" IDNO skip.DotNet
SetOutPath $TEMP
File "${PACKAGE_DIR_BIN}\dotNetFx35setup.exe"
GetDlgItem $0 $HWNDPARENT 1
System::Call "kernel32::CreateMutexA(i 0, i 0, t 'DotNetInstall') i .r0 ?e"
HideWindow
ExecWait "$TEMP\dotNetFx35setup.exe /qbf /norestart" $1
Delete "$TEMP\dotNetFx35setup.exe"
ShowWindow $0 ${SW_SHOW}
BringToFront
IntCmp $1 0 skip.DotNet
IntCmp $1 8192 skip.DotNet
IntCmp $1 3010 0 DotNetInstallationFailed DotNetInstallationFailed
SetRebootFlag true
goto skip.DotNet
DotNetInstallationFailed:
HideWindow
MessageBox MB_OK|MB_ICONSTOP "DotNet Framework 3.5 was not successfully installed on the machine"
Quit
skip.DotNet:
FunctionEnD
Download and package 3.5 SP1 from Micorsoft
More about NSIS
Update: For 3.0 check registry for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0
folder.