[Question] issue when using MsgReader in process base C#

I using MsgReader to reader an email in my local folder

msg = MsgReader.Mime.Message.Load(new FileInfo(filePath))

Everything is fine when I use in process with base vb.net (just testing)

But real process I using C# and there is an error when I run the process.

Please help me about this.

Thanks and Best Regards.

Hi @sanggait1996 ,

Did you used any custom activity like MsgReader while using the process with VB. please check if you missed to add these kind of custom activities while running the process using C#.

i think you have to import the name space MsgReader.Mime to resolve the issue.

Hi @kirankumar.mahanthi1

I tried to import name space MsgReader.Mine but the error is still there

Hi @sanggait1996 ,

What is the error you are facing now. And also please refer the below screenshot you have to create msg in MsgRead.Mime.Message type to resolve the error.

Hi @kirankumar.mahanthi1

I using the same type with you.

it’s still the same old bug.


ok. what is the .net version you are having in your machine. Not sure on this error. May be update the .net framework to latest and try. thanks.

Yep, I will try

thanks @kirankumar.mahanthi1 so much.

Your welcome @sanggait1996 . please try and let us know. thanks

Hi @kirankumar.mahanthi1

the latest .NET framework already installed on my computer.


ok. i have tried in VB it is working as expected. Not sure what is the problem with C#. one last suggestion from my end please make sure that you have latest version of uipath.system package.

Any helping hand here @jeevith @StefanSchnell @pravin_calvin @Robinnavinraj_S @shreyash_shirbhate thanks in advance.

Thanks for tagging @kirankumar.mahanthi1

I guess lets give it a try with latest UiPath.System.Activities package as mentioned by @kirankumar.mahanthi1

I hope this will help!

Hi @shreyash_shirbhate and @kirankumar.mahanthi1

I updated latest version but still not working.


In my environment, i can reproduce this issue.

MsgReader seems for net462 and net standard2.0/2.1 as the following,

So i think we should use Windows (net5) compatibility project to use it. (In my environment it works well in this compatibility)



Hi @Yoichi ,

I did your way and it working.

thank you so much :smiling_face_with_three_hearts:

1 Like