From 8e0b3240657107b56cbab7845d72c147c3c80f56 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 24 May 2023 10:47:37 +0300 Subject: [PATCH 1/8] Add different solutions for long path issue on windows --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 42 +++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index e463288239..434bce156b 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -1,10 +1,48 @@ + + + + + + + + + + + # How to Fix "Filename too long" Error on Windows -If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). +If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. + +## Solution 1 +Try [enabling the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). If you face long path errors related to Git, try the following command to enable long paths in Windows. ``` git config --system core.longpaths true ``` -See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path \ No newline at end of file +See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path + + +## Solution 2 + +Some of the .NET MAUI build tools need to run in 32-bit. This is not an ABP issue but .NET MAUI problem. +If you get "DirectoryNotFoundException - Could not find a part of the path" exception, put the solution in the root directory of your drive. For example `C:\Samples\` + +## Solution 3 +You can define an alias for a path in Windows by creating a symbolic link using the mklink command in the Command Prompt. Here's an example: + +``` +mklink /D C:\myalias D:\my\long\path\to\solution\ +``` +> Your **solution (.sln)** file should be in `D:\my\long\path\to\solution\`. If you link to an appliction, relative paths won't work. + +This command creates a symbolic link named `myalias` in the root of the `C:` drive that points to the `D:\my\long\path\to\solution\` directory. You can then use `C:\myprojectname` to access the contents of the `D:\my\long\path\to\solution\` directory. + +> Note that you need to run the Command Prompt as an administrator to create symbolic links. + +Then you can try building your app. + +``` +dotnet build C:\myprojectname\MyProjectName.sln +``` \ No newline at end of file From a8cd0a607018850ec1d6b78273ca0e1e65703c1d Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 24 May 2023 10:49:23 +0300 Subject: [PATCH 2/8] Remove blank spaces --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index 434bce156b..8026e78470 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -1,14 +1,3 @@ - - - - - - - - - - - # How to Fix "Filename too long" Error on Windows If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. From a77be406107e509abd3975886131fc82d4ad9c6b Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 24 May 2023 10:53:36 +0300 Subject: [PATCH 3/8] Update Windows-Path-Too-Long-Fix.md --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index 8026e78470..05a3ae55b5 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -22,11 +22,11 @@ If you get "DirectoryNotFoundException - Could not find a part of the path" exce You can define an alias for a path in Windows by creating a symbolic link using the mklink command in the Command Prompt. Here's an example: ``` -mklink /D C:\myalias D:\my\long\path\to\solution\ +mklink /D C:\myprojectname D:\my\long\path\to\solution\ ``` > Your **solution (.sln)** file should be in `D:\my\long\path\to\solution\`. If you link to an appliction, relative paths won't work. -This command creates a symbolic link named `myalias` in the root of the `C:` drive that points to the `D:\my\long\path\to\solution\` directory. You can then use `C:\myprojectname` to access the contents of the `D:\my\long\path\to\solution\` directory. +This command creates a symbolic link named `myprojectname` in the root of the `C:` drive that points to the `D:\my\long\path\to\solution\` directory. You can then use `C:\myprojectname` to access the contents of the `D:\my\long\path\to\solution\` directory. > Note that you need to run the Command Prompt as an administrator to create symbolic links. From 2e3cf441bf32d60fb1d1068453566d41a14a3982 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 24 May 2023 10:57:02 +0300 Subject: [PATCH 4/8] Update Windows-Path-Too-Long-Fix.md --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index 05a3ae55b5..d3ea310604 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -1,6 +1,6 @@ # How to Fix "Filename too long" Error on Windows -If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. +If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 256 characters. ## Solution 1 Try [enabling the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). From d8a4cca6d27af1d1d5507e3a6660974674de24e3 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 24 May 2023 10:58:17 +0300 Subject: [PATCH 5/8] Update Windows-Path-Too-Long-Fix.md --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index d3ea310604..377ae782ac 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -1,6 +1,6 @@ # How to Fix "Filename too long" Error on Windows -If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 256 characters. +If you encounter the "filename too long" or "unzip" error on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 255 characters. ## Solution 1 Try [enabling the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). From 45ad7fada1ccb00095c8ba59a7baf1aa928b1ce3 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 24 May 2023 11:21:37 +0300 Subject: [PATCH 6/8] Enhance paragraph with co-pilot --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index 377ae782ac..573f88efd0 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -15,8 +15,7 @@ See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-director ## Solution 2 -Some of the .NET MAUI build tools need to run in 32-bit. This is not an ABP issue but .NET MAUI problem. -If you get "DirectoryNotFoundException - Could not find a part of the path" exception, put the solution in the root directory of your drive. For example `C:\Samples\` +If you encounter a "DirectoryNotFoundException - Could not find a part of the path" exception while using certain .NET MAUI build tools, it may be necessary to run them in 32-bit mode. To resolve this issue, you can try placing the solution in the root directory of your drive, such as `C:\Samples\`. However, please note that this solution is specific to this particular exception and may not be applicable to all cases of the Windows long path issue. ## Solution 3 You can define an alias for a path in Windows by creating a symbolic link using the mklink command in the Command Prompt. Here's an example: From 1ae7a213cbbf596e622a6bd00a06bd823f4513e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20Ebi=C3=A7o=C4=9Flu?= <9526587+ebicoglu@users.noreply.github.com> Date: Wed, 24 May 2023 12:52:59 +0300 Subject: [PATCH 7/8] Update Windows-Path-Too-Long-Fix.md improve --- docs/en/KB/Windows-Path-Too-Long-Fix.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/en/KB/Windows-Path-Too-Long-Fix.md b/docs/en/KB/Windows-Path-Too-Long-Fix.md index 573f88efd0..6a822c1402 100644 --- a/docs/en/KB/Windows-Path-Too-Long-Fix.md +++ b/docs/en/KB/Windows-Path-Too-Long-Fix.md @@ -15,22 +15,25 @@ See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-director ## Solution 2 -If you encounter a "DirectoryNotFoundException - Could not find a part of the path" exception while using certain .NET MAUI build tools, it may be necessary to run them in 32-bit mode. To resolve this issue, you can try placing the solution in the root directory of your drive, such as `C:\Samples\`. However, please note that this solution is specific to this particular exception and may not be applicable to all cases of the Windows long path issue. +You may encounter a "DirectoryNotFoundException - Could not find a part of the path" exception in Windows while using certain .NET MAUI build tools. This is related to some 32 bit .NET MAUI build tools. To resolve this issue, you can try placing the solution in the root directory of your drive, such as `C:\Projects\`. However, please note that this solution is specific to this particular exception and may not be applicable to all cases of the Windows long path issue. + ## Solution 3 -You can define an alias for a path in Windows by creating a symbolic link using the mklink command in the Command Prompt. Here's an example: + +You can define an alias for a path in Windows by creating a symbolic link using the `mklink` command in the command prompt. Here's an example: ``` -mklink /D C:\myprojectname D:\my\long\path\to\solution\ +mklink /D C:\MyProject C:\my\long\path\to\solution\ ``` -> Your **solution (.sln)** file should be in `D:\my\long\path\to\solution\`. If you link to an appliction, relative paths won't work. -This command creates a symbolic link named `myprojectname` in the root of the `C:` drive that points to the `D:\my\long\path\to\solution\` directory. You can then use `C:\myprojectname` to access the contents of the `D:\my\long\path\to\solution\` directory. +> Your **solution (.sln)** file should be in `C:\my\long\path\to\solution\`. Keep in mind that, if you have relative paths in your .csproj file, it will not work! -> Note that you need to run the Command Prompt as an administrator to create symbolic links. +This command creates a symbolic link named `MyProject` in the root of the `C:` drive that points to the `C:\my\long\path\to\solution\` directory. You can then use `C:\MyProject` to access the contents of the `C:\my\long\path\to\solution\` directory. -Then you can try building your app. +> Note that you need to run the command prompt as an administrator to the create symbolic links. +Then you can try building your project with `dotnet build` command. + +``` +dotnet build C:\MyProject\MyProjectName.sln ``` -dotnet build C:\myprojectname\MyProjectName.sln -``` \ No newline at end of file From 10bf070c9a41f20735fbca1b14373250d1c80a35 Mon Sep 17 00:00:00 2001 From: Masum ULU Date: Wed, 24 May 2023 18:04:38 +0300 Subject: [PATCH 8/8] minor bug fixed --- .../oauth/src/lib/strategies/auth-code-flow-strategy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts b/npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts index 184ef59dca..c7bf345703 100644 --- a/npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts +++ b/npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts @@ -14,9 +14,12 @@ export class AuthCodeFlowStrategy extends AuthFlowStrategy { } navigateToLogin(queryParams?: Params) { - const additionalState = queryParams.returnUrl; - const cultureParams = this.getCultureParams(queryParams); + let additionalState = ''; + if (!!queryParams?.returnUrl) { + additionalState = queryParams.returnUrl; + } + const cultureParams = this.getCultureParams(queryParams); this.oAuthService.initCodeFlow(additionalState, cultureParams); }