Fix TargetInvocationException from xml profile serialization issues (2279035)

Why are we deleting the new profile?