VS2015 compiler error: Failed to produce item .lib

Same. I am using Visual Studio 2017 and it does this everytime I change something in my code. The only solution is to rebuild.