AdvancedHMI requires .NET 4.0 because it uses some functionality that only exists in 4.0
You should be able to reference a .NET 3.5 library in the AdvancedHMI project. Maybe it will require adding a form to the AdvancedHMI project, then copying your code to it.