"The process cannot access the file" error after package update

I have a component that saves .pdf attachments from outlook emails to the folder.
It has been working fine until recently it started throwing an error:

Create file and open file stream: The process cannot access the file ‘C:[…].pdf’ because it is being used by another process.

I think that happened after I updated the System.Activities package to the latest version.
It stops at the “Create file and open file stream” activity - the path is clear, looks file the File.Create is successful, the empty .pdf paper on the disc, but it fail on the assignment to [fileStream].
How I can repair it ?


Are you closing the File Stream after you are done working with it?

Why not just use the file copy activity to create the file?

The error appears when I create file.
Anyways, never mind, the problem was something completely different.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.