Environment.CurrentDirectory changing after Reusable

Hi All,

I have downloaded the reusable package after that Environment.currentDirectory path has been changed.

Could anyone help me here why its changed and how to resolve this?

Current Directory–> C:\Users<user>.nuget\packages\reusable.utilitytools\1.0.22\lib\net45\Data\Output\

Previous Directory-> C:\Users<user>.nuget\packages<Process name>\2.0.20\lib\net45\Data\Output\ (I need this directory to reflect when i run)

@Pavan_kumar15,

It happens due to version change. Every version here stored with version number folder.

Thanks,
Ashok :slightly_smiling_face:

@Pavan_kumar15

  1. It changes with eqch version
  2. When running from project the current directory would be the project folder…when it is a library as it runs under library context it would show current directory as library

Cheers

Hello

You can perhaps use and pass this command via argument:

Directory.GetCurrentDirectory().ToString

Regards,
Soren

Hi @Anil_G ,

How can i get the Project directory ?

C:\Users.nuget\packages\2.0.20\lib\net45\Data\Output\

@Pavan_kumar15

Then you need to use env.currentdirectory befor calling activity and pass that value to the activity instead of directly using it in there

Cheers

@Anil_G

Environment.CurrentDirectory +""+Data\Output ?

@Pavan_kumar15

if data/output folder is needed in reusable thenpass it from poject as below…what you mentioned above also would work but better to pass as below

Path.Combine(Environment.CurrentDirectory,"Data","Output")

Make sure you pass it from the project xaml only and not use it directly in library or reusable

Hope this helps

cheers