Visual Studio 2015 Update 1 Bug: “An Error Was Encountered During Code Generation”
If you are working in Visual Studio 2015 Update 1 and encounter the following error in the designer:
“An error was encountered during code generation. The changes you have made in the designer have not been committed to the source code”
You are not alone; many developers have experienced this issue. For more details, you can read the MSDN announcement: MSDN Article.
To resolve this bug, install the official Microsoft hotfix available here: Microsoft Download Center.
This hotfix will resolve the designer code generation issue in Visual Studio 2015 Update 1.