Error when building SOAP custom activities

Hi, I’m trying to build custom activities for SOAP service and I get this error when I try to build

If I set target framework to .4 it builds successfully but there is no validation in uipath for these activities and I can’t run the workflow then because it always says “Fix the validation errors”. Anyone know how to fix this?