Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MineCake147E opened this issue Dec 28, 2023 · 5 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@MineCake147E
Copy link

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 MineCake147E added the bug Something isn't working label Dec 28, 2023
@IXLLEGACYIXL
Copy link
Collaborator

IXLLEGACYIXL commented Dec 30, 2023

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

@Eideren
Copy link
Collaborator

Eideren commented Dec 30, 2023

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

@MineCake147E
Copy link
Author

I found that MSBuild could be the one who escapes the braces in UsingTask.
dotnet/msbuild#157
dotnet/msbuild#885
dotnet/msbuild#6637

@Kryptos-FR
Copy link
Member

Kryptos-FR commented Jan 19, 2024

@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?

@MineCake147E
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants