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

Code-only sample code doesn't build #133

Closed
CocoDico78 opened this issue Apr 21, 2024 · 9 comments
Closed

Code-only sample code doesn't build #133

CocoDico78 opened this issue Apr 21, 2024 · 9 comments

Comments

@CocoDico78
Copy link

CocoDico78 commented Apr 21, 2024

Trying to follow instructions on https://stride3d.github.io/stride-community-toolkit/manual/code-only/create-project.html

Error from the Build log

MSB3073 The command ""C:\Users\xxx.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive..\lib\net8.0\Stride.Core.Assets.CompilerApp.exe" --disable-auto-compile --project-configuration "Debug" --platform=Windows --project-configuration=Debug --compile-property:StrideGraphicsApi=Direct3D11 --output-path="D:\repos\xxx\src\Console\bin\Debug\net8.0\data" --build-path="D:\repos\xxx\src\Console\obj\stride\assetbuild\data" --package-file="D:\repos\xxx\src\Console\Console.csproj" --msbuild-uptodatecheck-filebase="D:\repos\xxx\src\Console\obj\Debug\net8.0\stride\assetcompiler-uptodatecheck"" exited with code 1.

at

C:\Users\xxx.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive\Stride.Core.Assets.CompilerApp.targets line 153

After running the failing underlying command in CLI, I get this error:

Error restoring NuGet packages!
Could not load file or assembly 'System.Security.Cryptography.Pkcs, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Repro:

  • Install Microsoft Visual C++ 2015-2022 Redistributable , .NET 8 SDK
  • Create new console app with .NET 8.0
  • Add package Stride.CommunityToolkit 1.0.0-preview.38
  • Replace Program.cs with provided sample code
  • Try to build
@VaclavElias
Copy link
Collaborator

Let me check this..

@VaclavElias
Copy link
Collaborator

I am going to do a few more tests, but it seems to be working for me on my VM. I am going to try a clean VM.

Could you try to delete your obj and bin folder, and build the project again?

@CocoDico78
Copy link
Author

Still same error. For repro, I've set up a tiny repo with exactly the steps from the doc (I've added a global.json to ensure same version of SDK and disable preview SDK).

https://github.com/CocoDico78/StrideCodeOnlyBuildIssue

@VaclavElias
Copy link
Collaborator

I was able to replicate this issue on clean VM. There seems to be some hidden and deep depenceny on this package 'System.Security.Cryptography.Pkcs, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Weirdly, it works on my dev computer because of some unknown references. I will raise a ticket in Stride repo and will work on this to figure out where the reference is and update it.

@VaclavElias
Copy link
Collaborator

I have some way around, till this is resolved.

Please follow these steps, which install/change references to the missing package:

  1. Install Stride Installer (https://www.stride3d.net/download/)
  2. Install the latest version of Stride from the installer
  3. Click Start - This will trigger installing some other NuGet packages
  4. You can close the Project selection Window
  5. Delete obj/bin in your code only project
  6. Build and run your code only project

References:
stride3d/stride#2232

@CocoDico78
Copy link
Author

I confirm it's now working, thanks 👍

@VaclavElias
Copy link
Collaborator

Thank you for confirmation. You can leave this issue with me and I will close it once I have a proper solution :)

@VaclavElias
Copy link
Collaborator

The issue addressed in the description was resolved. I have to update all code-only examples, so they are using Stride.CommunityToolkit.Windows instead of Stride.CommunityToolkit.

@VaclavElias
Copy link
Collaborator

The docs were just released and examples updated. The main example updated https://stride3d.github.io/stride-community-toolkit/manual/code-only/create-project.html

I am closing this as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants