Send SMTP mail does not work without any reason - failed load assembly

Hi all !
I need your help…
I got this error when I try to use the activity UiPath.Mail.SMTP.[Activities]

Send SMTP Mail Message: Could not load file or assembly ‘System.Formats.Asn1, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The system cannot find the file specified.

I do not understand…

  • i did a change in the value of smtp server ( stored on an asset, so nothing has changed at robot level) .
  • This new server works well: i did several test of reachability before changing the asset.
    -I’m using the same workflow to send mail (same activities, same parameters) in other process and all works correctly
    -I’ve tried to copy paste activity from my working process
  • i’ve followed another similar topic in which someone suggest to add namespace on xaml and i did it.

Can you help me understand WHY this happens and HOW can i face this prooblem? :frowning:
Thank you !

Hi @enrica.cornetta

Could you please add namespace in below way.

Regards
Sonali

Hi, thank you!
As I said in the last point, i added namespace directly in the xaml file ( that one indicated in the log) : i have to do it on every xaml of the project?
Do you know WHY this happens without any apparent reason?

@enrica.cornetta

Please try the way mentioned in the thread shared above.

For now, just do it in the xaml which is throwing you this error.

I’ve already tried ( when i say ’ directly in the xaml’ i mean in the text editor) and it does not work :frowning:

As you say that same configuration is working in other processes but not in this one, can you please verify below:

  1. verify dependencies and their version ls used in both the processes. Is there any difference?
  2. have you tried running other working process in same machine where current process is not working?

@enrica.cornetta

  1. try to check if the versions of packages are same
  2. As it is not found error first thing we can do is to go to c:\users\username.nuget and rename the packages folder so that it is downloaded again when you open the project which ensure all packages are redownloaded and referenced

cheers

Yes, other processes are running on the same machine and this is the only one that doesn’t work :frowning:

@enrica.cornetta

Can you also please verify the packages and their versions in both the processes(working and not working)?

I deleted the asn1 folder then it downloaded it and it’s referenced


Immagine 2025-05-23 155513

this is a nugket package that has always worked, but the day after i changed an Asset it broke like that: i’m modifying a nugket package that’s running on customer’s server: i cannot open the project on studio and public a new package for the moment

@enrica.cornetta

You need not publish..you can delete the package let it download again..you can rename the packages folder and all processes will get downloaded again with their respective dependencies

Cheers