fix reference to AvalonEdit after repository move
update buildpackages.cmd
downgrade projects to .NET 4.0
add error handling to buildpackages.cmd