Dotnet Solution build failed in SharePoint server

Dotnet solution build failed – I have VS 2015 and it was installed on SharePoint server. Before that it was build successfully, but all of sudden whenever I added code (in designer) like

. Simple code. and then build the solution. Immediately the solution was failed to build and getting below error message. If anyone have any kind of solution or information please help me, Immediately…

**The custom tool ‘SharePointWebPartCodeGenerator’ failed. The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm. You may try re-running the custom tool by right-clicking on the file in the Solution Explorer and choosing Run Custom Tool.

.NET Foundation Website | Blog | Projects | Code of Conduct