HLSL code 'Texture2D' to 'sampler2D'

in this method the sampled texture cannot be used for vertex shader. it will throw error.
do you have any solution for the vertex shader case as well ?