Posts: 1,031
Threads: 246
Joined: Jul 2022
04-27-2024, 10:34 AM
(This post was last modified: 04-27-2024, 10:37 AM by Davider.)
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
Posts: 1,031
Threads: 246
Joined: Jul 2022
04-28-2024, 12:55 AM
(This post was last modified: 04-28-2024, 12:57 AM by Davider.)
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.
Posts: 1,031
Threads: 246
Joined: Jul 2022
04-30-2024, 10:22 PM
(This post was last modified: 04-30-2024, 10:33 PM by Davider.)
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; /*/
Posts: 1,031
Threads: 246
Joined: Jul 2022
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
Posts: 12,073
Threads: 140
Joined: Dec 2002
#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.
Posts: 1,031
Threads: 246
Joined: Jul 2022
07-15-2024, 06:26 AM
(This post was last modified: 07-15-2024, 06:32 AM by Davider.)
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.
Posts: 12,073
Threads: 140
Joined: Dec 2002
%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.
Posts: 1,031
Threads: 246
Joined: Jul 2022
07-15-2024, 06:41 AM
(This post was last modified: 07-15-2024, 06:41 AM by Davider.)
It would be great if %dll% could be used in both the installed version of LA and the portable version of LA.