elsa-core icon indicating copy to clipboard operation
elsa-core copied to clipboard

Visual Studio fails to build elsa-core code if checked out into folder with longish path

Open tomy2105 opened this issue 4 years ago • 4 comments

Thought I mention it here to save somebody else some trouble and time....

This is, not directly, fault of Elsa but of Visual Studio and the build tools it uses (as well as system configuration about long paths). See Allow building, running, and debugging a .NET application in a long path.

The only thing Elsa can do is try not to use long folder names in its folder structure to help this problem not happen with such short folder structure, but I'm not sure if it is worth the trouble........

In short if you place Elsa code in D:\Projects\IntServer\elsa-core it will compile ok with VS 2022. If you place it in D:\Projects\InteractionServer\elsa-core it will compile ok with VS 2022 and the errors will look like (not very intuitive):

error : Could not find a part of the path 'D:\Projects\Envox\Mainline\Source\Servers\InteractionServer\elsa-core\src\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\obj\Debug\netstandard2.1\Elsa.Persistence.EntityFramework.Core.GeneratedMSBuildEditorConfig.editorconfig'. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\Elsa.Persistence.EntityFramework.Core.csproj" was not found. error : Could not find a part of the path 'D:\Projects\Envox\Mainline\Source\Servers\InteractionServer\elsa-core\src\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Oracle\obj\Debug\netcoreapp3.1\Elsa.Persistence.EntityFramework.Oracle.GeneratedMSBuildEditorConfig.editorconfig'. error MSB3202: The project file "..\Elsa.WorkflowSettings.Persistence.EntityFramework.Core\Elsa.WorkflowSettings.Persistence.EntityFramework.Core.csproj" was not found. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\Elsa.Persistence.EntityFramework.Core.csproj" was not found. error MSB3491: Could not write lines to file "obj\Debug\netcoreapp3.1\Elsa.WorkflowSettings.Persistence.EntityFramework.Sqlite.csproj.FileListAbsolute.txt". Could not find a part of the path 'D:\Projects\Envox\Mainline\Source\Servers\InteractionServer\elsa-core\src\modules\workflowsettings\Elsa.WorkflowSettings.Persistence.EntityFramework.Sqlite\obj\Debug\netcoreapp3.1\Elsa.WorkflowSettings.Persistence.EntityFramework.Sqlite.csproj.FileListAbsolute.txt'. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.MySql\Elsa.Persistence.EntityFramework.MySql.csproj" was not found. error MSB3202: The project file "..\Elsa.WorkflowSettings.Persistence.EntityFramework.Core\Elsa.WorkflowSettings.Persistence.EntityFramework.Core.csproj" was not found. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\Elsa.Persistence.EntityFramework.Core.csproj" was not found. error MSB3491: Could not write lines to file "obj\Debug\netcoreapp3.1\Elsa.WorkflowSettings.Persistence.EntityFramework.MySql.csproj.FileListAbsolute.txt". Could not find a part of the path 'D:\Projects\Envox\Mainline\Source\Servers\InteractionServer\elsa-core\src\modules\workflowsettings\Elsa.WorkflowSettings.Persistence.EntityFramework.MySql\obj\Debug\netcoreapp3.1\Elsa.WorkflowSettings.Persistence.EntityFramework.MySql.csproj.FileListAbsolute.txt'. error MSB3202: The project file "..\Elsa.WorkflowSettings.Persistence.EntityFramework.Core\Elsa.WorkflowSettings.Persistence.EntityFramework.Core.csproj" was not found. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\Elsa.Persistence.EntityFramework.Core.csproj" was not found. error MSB3491: Could not write lines to file "obj\Debug\net6.0\Elsa.WorkflowSettings.Persistence.EntityFramework.SqlServer.csproj.FileListAbsolute.txt". Could not find a part of the path 'D:\Projects\Envox\Mainline\Source\Servers\InteractionServer\elsa-core\src\modules\workflowsettings\Elsa.WorkflowSettings.Persistence.EntityFramework.SqlServer\obj\Debug\net6.0\Elsa.WorkflowSettings.Persistence.EntityFramework.SqlServer.csproj.FileListAbsolute.txt'. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\Elsa.Persistence.EntityFramework.Core.csproj" was not found. error MSB3202: The project file "..\..\..\persistence\Elsa.Persistence.EntityFramework\Elsa.Persistence.EntityFramework.Core\Elsa.Persistence.EntityFramework.Core.csproj" was not found.

tomy2105 avatar Apr 14 '22 09:04 tomy2105

Thanks for raising awareness of this issue!

sfmskywalker avatar Apr 14 '22 09:04 sfmskywalker

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 13 '22 17:06 stale[bot]

I have the same issue. Is there any fix for this issue? This issue will become critical on automatic build on azure DevOps with a default long build path.

MehdiSaeedifar avatar Jun 15 '22 05:06 MehdiSaeedifar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 15 '22 11:08 stale[bot]

I’ve been building Elsa solutions on DevOps for a few years snow, never had an issue with path names being too long.

sfmskywalker avatar Aug 31 '22 06:08 sfmskywalker