A new asymptotic approach to the theory of thin-walled rods of open profile is suggested. For the problem of linear static deformation of a noncircular cylindrical shell we consider solutions, which are slowly varying along the axial coordinate. A small parameter is introduced in the equations of the modern theory of shells. Conditions of compatibility for the shell strain measures are employed. The principal terms of the series expansion of the solution are determined from the conditions of solvability for the minor terms. We conclude the procedure with the subsequent solution for the field of displacements. The analysis shows that the known equations of thin-walled rods, which were previously obtained with some approximate methods using hypotheses and approximations of displacements, are asymptotically exact. The presented semi-numerical analysis of the shell equations allows us to estimate the accuracy of the obtained solution. The results of the paper constitute a sound basis to the equations of the theory of thin-walled rods and provide trustworthy information concerning the distribution of stresses in the cross-section.