It is well explained at https://powerbi.microsoft.com/en-us/documentation/powerbi-custom-visuals-getting-started-with-developer-tools/. Double check Inside the visual project and Package your visual for use in Power BI Desktop and distribution.
To add a custom visual to a report in Power BI Desktop, see https://powerbi.microsoft.com/en-us/documentation/powerbi-custom-visuals-use/.