I have published a WinForms application from Visual Studio 2010. It uses .NET 4.0. in the prerequisite dialog in Publish pane I selected .NET 4.0 Client Profile and Windows Inst
Open project properties Alt+Enter.
Click on publish tab.
visit this website for more detail https://msdn.microsoft.com/en-us/library/ms251723.aspx