Hi ,
Anyone please tell me how I can get path of Packages LocalDirectory folder present inside AOSService, since I want to access Dll that is present inside bin folder of PackagesLocalDirectory
Do you want to use that dll in the code ?
Hi Uzair,
What do you want to do with the file.
You can add reference like this.
You can also add a reference to a .Net assembly, then an AxReference element is added to your model and the assembly (dll) is automatically copied to the bin folder of your package. For example, If you are developing in the model ISVModel1 that belongs to the package ISVPackage1:
1.The assembly will be copied to <PackagesLocalDirectory>\ISVPackage1\bin\Thirdpartyassembly.dll2.An AXReference is created in <PackagesLocalDirectory>\ISVPackage1\ISVModel1\AxReference\Thirdpartyassembly.xml
Hope this helps.
The default Packages LocalDirectory folder is C:\AOSService\PackagesLocalDirectory, but the drive can change for different environments
in local VHD it's in path as suggested by Martina and in Cloud hosted either by MS or your own subscription could be be J or I drive
There is a more generic way than guessing drives. However, before we get into that I want to try and convince you that this is the wrong way to go about it.
You can NOT depend on infrastructure (paths etc), and loading assemblies explicitly is never a good idea. The packages/bin is in the probe path, and also most DLLs in there will be loaded already anyway. As pointed out in this thread, consider just using a reference and leave the loading of the assembly to the system. If you're planning to use reflection and want to use some of those functions that need the path to the DLL -please don't. Reflection is a virtually guaranteed way to have your system break in some future update.
But finally, sure. There should be an environment variable called "service drive" that points to the drive letter. Append aosservice/packageslocaldirectory (but again, this could change in the future and your code would just break).
Please figure out a different way and avoid needing the paths.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 765 Super User 2025 Season 2
CA Neeraj Kumar 743
Sumit Singh 551