Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DLL Paths in Project Folders
#1
In the following scenarios:
1. I don't want to use NuGet to download and install the latest version of DLLs.
2. I want to package the DLLs together with the project files.
3. I don't want to install the .NET SDK (NuGet), but still want to compile the project.

If the DLL paths in the project only contain the DLL filenames, it seems more convenient.Shorter, easier to understand:
This way, it would be suitable for both the portable version of LA and the installed version of LA.

If Dlls in project folder:
 r %folders.Workspace%\files\@T1\Markdig.dll;
TO:
 r Markdig.dll;

see demo:
https://i.ibb.co/yhV3jRC/abc.gif
#2
This is mainly for convenience. I use the portable version of LA for code debugging on my client's computer, without needing to install the SDK of around 1GB or modify the NuGet code at the top of the editing area.
I just need to package the project folder into a ZIP file.
#3
I encountered an issue where the paths of the DLLs in the LA portable version project and the paths of the DLLs in the LA installed version project changed, forcing me to manually adjust the paths.

LA portable version:
/*/ role exeProgram; outputPath C:\_WwBot; r %folders.Workspace%\dll\Markdig.dll;  /*/ 

LA installed version
/*/ role exeProgram; outputPath C:\_WwBot; r %folders.Workspace%\files\bot\WwBot\@WwBot\dll\Markdig.dll; /*/ 

In the Linpad .linq files, there are two types of supported paths: relative paths and absolute paths, which played a role in solving the above problem.

My suggestion: If the DLL is located in the project folder, I can use the following code to ensure uniform relative paths in both the LA portable and installed versions.

/*/ role exeProgram; outputPath C:\_WwBot; r dll\Markdig.dll;  /*/ //in dll folder
/*/ role exeProgram; outputPath C:\_WwBot; r Markdig.dll;  /*/
#4
In the new portable version of LA, the path to the Dll file has changed, as shown in the image below. It is recommended to standardize it to one of the following values to avoid confusion:
r %folders.Workspace%\dll\Edge_tts_sharp.dll;
or
r %dll%\Edge_tts_sharp.dll;

https://i.ibb.co/d5bfCzQ/A.gif
#5
#4. Fixed in next LA.

---------

r relative path -> r path in LA folder. Can't be changed.

But why do you want to use
r %folders.Workspace%\files\@T1\Markdig.dll;
and not
r %folders.Workspace%\dll\Markdig.dll;
? The first folder is for source files; the second is for dll files. If you create .exe, in both cases the dll is copied to the exe folder.
#6
I have placed some commonly used DLL components in the dll folder because I do not want to use NuGet in the portable version. I want to keep the dll folder synchronized between the installed version of LA and the portable version, including the references. This way, it will be much easier for me.

Is it possible to use the following code?
r %folders.dll%\Markdig.dll;

My current issue is that I don't want to use NuGet references in the portable version because it requires installing the SDK. Even when using NuGet in the installed version of LA, it is temporary. I will copy these DLLs to the dll folder and then synchronize them to the portable version of LA.
#7
%folders.Workspace%\dll is part of the workspace and is synchronized (copied to portable) by the Portable LA setup tool. In portable LA it is the portable folder.

LA adds a local environment variable dll = %folders.Workspace%\dll. Therefore %dll% is the same as %folders.Workspace%\dll.
#8
It would be great if %dll% could be used in both the installed version of LA and the portable version of LA.  Wink


Forum Jump:


Users browsing this thread: 1 Guest(s)