stride icon indicating copy to clipboard operation
stride copied to clipboard

Could not load file or assembly 'Stride.Core.AssemblyProcessor.dll'.

Open MineCake147E opened this issue 2 years ago • 5 comments

Release Type: Official Release

Version: 4.2.0.2043

Platform: Windows 11 22H2

Describe the bug Whenever I create/load a project, I couldn't build anything.

To Reproduce Steps to reproduce the behavior:

  1. Create a new project, or open an existing project.
  2. Observe the errors.

Expected behavior Project loads correctly.

Screenshots image

Log and callstacks

Verbose: Process dependencies for MyGame.Windows...
Verbose: Process dependencies for MyGame...
Verbose: Restore NuGet packages for MyGame...
Verbose: Restore NuGet packages for MyGame.Windows...
Verbose: Process dependencies for MyGame.Linux...
Verbose: Restore NuGet packages for MyGame.Linux...
Verbose: Loading Assets from Package [Stride.Engine.sdpkg]
Verbose: Loading Assets from Package [Stride.Graphics.sdpkg]
Verbose: Loading Assets from Package [Stride.Particles.sdpkg]
Verbose: Loading Assets from Package [Stride.Rendering.sdpkg]
Verbose: Loading Assets from Package [Stride.SpriteStudio.Offline.sdpkg]
Verbose: Loading Assets from Package [Stride.Video.sdpkg]
[C:\Users\ちーず(・8・)けーき\.nuget\packages\stride.core\4.2.0.2043\buildTransitive\Stride.Core.targets(94,5)]: Error: "AssemblyProcessorTask" タスクをアセンブリ C:\Users\ちーず%28・8・%29けーき\AppData\Local\Temp\\Stride\AssemblyProcessor\netstandard2.0\BFE7D3C7730ED74698052516FFD23052551DA0B625689910B2D19CC3FA917F7C\Stride.Core.AssemblyProcessor.dll から読み込めませんでした。Could not load file or assembly 'C:\Users\ちーず%28・8・%29けーき\AppData\Local\Temp\Stride\AssemblyProcessor\netstandard2.0\BFE7D3C7730ED74698052516FFD23052551DA0B625689910B2D19CC3FA917F7C\Stride.Core.AssemblyProcessor.dll'. 指定されたパスが見つかりません。 <UsingTask> 宣言が正しいこと、アセンブリとその依存関係が使用可能であること、および Microsoft.Build.Framework.ITask を実装するパブリック クラスがタスクに含まれていることを確認してください。
Error: Unable to build assembly reference [C:\Users\ちーず(・8・)けーき\Documents\Stride Projects\MyGame\MyGame\bin\Debug\net8.0-windows\MyGame.dll]
Verbose: Loading Assets from Package [MyGame.sdpkg]
Verbose: Loading Assets from Package [MyGame.Windows.sdpkg]
Verbose: Loading Assets from Package [MyGame.Linux.sdpkg]

Additional context I noticed that the parentheses are somehow URL-encoded. In other words, (・8・) became %28・8・%29. I found the Stride.Core.AssemblyProcessor.dll in the directory C:\Users\ちーず(・8・)けーき\AppData\Local\Temp\Stride\AssemblyProcessor\netstandard2.0\BFE7D3C7730ED74698052516FFD23052551DA0B625689910B2D19CC3FA917F7C. image

MineCake147E avatar Dec 28 '23 10:12 MineCake147E

as a temporary "fix" you could create a windows VM with english as language and develop from there in stride

IXLLEGACYIXL avatar Dec 30 '23 17:12 IXLLEGACYIXL

Another workaround would be to set your NUGET_PACKAGES environment variable to another safer path https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders

Eideren avatar Dec 30 '23 17:12 Eideren

I found that MSBuild could be the one who escapes the braces in UsingTask. https://github.com/dotnet/msbuild/issues/157 https://github.com/dotnet/msbuild/issues/885 https://github.com/dotnet/msbuild/issues/6637

MineCake147E avatar Jan 19 '24 08:01 MineCake147E

@MineCake147E Thanks for the links.

I have attempted a fix in branch feature/unicode-path-fix but I didn't manage to reproduce the error locally, even when using a project name with parentheses.

Can you try to build Stride locally from that branch and see if that fixes it for you?

Kryptos-FR avatar Jan 19 '24 13:01 Kryptos-FR

but I didn't manage to reproduce the error locally, even when using a project name with parentheses.

The key here is the user name set with parentheses included. Otherwise, the TEMP in some *.targets files wouldn't contain any parentheses.

I suspect the one garbles the path could be UsingTask element. When I modified the AssemblyFile for some UsingTask that contains TEMP, using Unescape function, it worked as expected for me. Though such workaround could end up introducing another problem.

MineCake147E avatar Jan 20 '24 04:01 MineCake147E