You should consider security in all aspects of your application development, from design to deployment. Start by running Visual Studio as securely as possible. See User Permissions and Visual Studio.
To help you effectively develop secure applications, you should have a fundamental understanding of security concepts and the security features of the platforms for which you develop. You should also understand secure coding techniques.
Most coding errors that result in security vulnerabilities occur because developers make incorrect assumptions when working with user input or because they don't fully understand the platform for which they're developing.