stride3d / stride

Stride Game Engine (formerly Xenko)
https://stride3d.net
MIT License
6.33k stars 917 forks source link

Clean Install - NuGet - Stride.Core.Assets.CompilerApp.exe fails - NuGet conflict #2232

Open VaclavElias opened 2 months ago

VaclavElias commented 2 months ago

Release Type: Official Release

Version: 4.2.0.2122

Platform(s): Windows

Describe the bug Build fails for code only simple projects.

Similar issue https://github.com/stride3d/stride/issues/1279

To Reproduce Steps to reproduce the behavior: https://github.com/stride3d/stride-community-toolkit/issues/133

Expected behavior The build was working previously with 4.2.0.2067

Screenshots N/a

Log and callstacks

C:\Examples\Example01>dotnet build
MSBuild version 17.9.8+b34f75857 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  Patch for assembly [Example01, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
  Example01 -> C:\Examples\Example01\bin\Debug\net8.0\Example01.dll
  Error restoring NuGet packages!

  ==== Exception details ====

  System.AggregateException: One or more errors occurred. (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.)
   ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Cryptography.Pkcs, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03
  f5f7f11d50a3a'. The system cannot find the file specified.
  File name: 'System.Security.Cryptography.Pkcs, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
     at NuGet.Packaging.Signing.PrimarySignature.Load(Byte[] data)
     at NuGet.Packaging.Signing.PrimarySignature.Load(Stream stream)
     at NuGet.Packaging.PackageArchiveReader.GetPrimarySignatureAsync(CancellationToken token)
     at NuGet.Packaging.Signing.PackageSignatureVerifier.VerifySignaturesAsync(ISignedPackageReader package, SignedPackageVerifierSettings settings, Cancellation
  Token token, Guid parentId)
     at NuGet.Packaging.PackageExtractor.VerifyPackageSignatureAsync(String source, Guid parentId, PackageIdentity package, PackageExtractionContext packageExtra
  ctionContext, ISignedPackageReader signedPackageReader, CancellationToken token)
     at NuGet.Packaging.PackageExtractor.<>c__DisplayClass5_0.<<InstallFromSourceAsync>b__0>d.MoveNext()
  --- End of stack trace from previous location ---
     at NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync[T](String filePath, Func`2 action, CancellationToken token)
     at NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync[T](String filePath, Func`2 action, CancellationToken token)
     at NuGet.Packaging.PackageExtractor.InstallFromSourceAsync(PackageIdentity packageIdentity, IPackageDownloader packageDownloader, VersionFolderPathResolver
  versionFolderPathResolver, PackageExtractionContext packageExtractionContext, CancellationToken token, Guid parentId)
     at NuGet.Commands.ProjectRestoreCommand.InstallPackageAsync(RemoteMatch installItem, NuGetv3LocalRepository userPackageFolder, PackageExtractionContext pack
  ageExtractionContext, CancellationToken token)
     at NuGet.Commands.ProjectRestoreCommand.<>c__DisplayClass15_1.<<InstallPackagesAsync>b__4>d.MoveNext()
  --- End of stack trace from previous location ---
     at NuGet.Commands.ProjectRestoreCommand.InstallPackagesAsync(HashSet`1 uniquePackages, IEnumerable`1 graphs, IList`1 downloadDependencyInformations, NuGetv3
  LocalRepository userPackageFolder, CancellationToken token)
     at NuGet.Commands.ProjectRestoreCommand.TryRestoreAsync(LibraryRange projectRange, IEnumerable`1 frameworkRuntimePairs, NuGetv3LocalRepository userPackageFo
  lder, IReadOnlyList`1 fallbackPackageFolders, RemoteDependencyWalker remoteWalker, RemoteWalkContext context, Boolean forceRuntimeGraphCreation, CancellationTo
  ken token, TelemetryActivity telemetryActivity, String telemetryPrefix)
     at NuGet.Commands.RestoreCommand.ExecuteRestoreAsync(NuGetv3LocalRepository userPackageFolder, IReadOnlyList`1 fallbackPackageFolders, RemoteWalkContext con
  text, CancellationToken token, TelemetryActivity telemetryActivity)
     at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token)
     at NuGet.Commands.RestoreRunner.ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token)
     at NuGet.Commands.RestoreRunner.CompleteTaskAsync(List`1 restoreTasks)
     at NuGet.Commands.RestoreRunner.RunWithoutCommit(IEnumerable`1 restoreRequests, RestoreArgs restoreContext)
     --- End of inner exception stack trace ---
     at Stride.Core.Assets.RestoreHelper.Restore(ILogger logger, NuGetFramework nugetFramework, String runtimeIdentifier, String packageName, VersionRange versio
  nRange, String settingsRoot)
     at Stride.Core.Assets.NuGetAssemblyResolver.<>c__DisplayClass5_0.<SetupNuGet>b__0(Object sender, ResolveEventArgs eventArgs)

  ==== Log ====

  [Verbose] Running restore with 4 concurrent jobs.
  [Verbose] Reading project file StrideNugetResolver.json.
  [Information] Restoring packages for StrideNugetResolver.json...
  [Verbose] Restoring packages for .NETCoreApp,Version=v8.0...
  [Verbose] Resolving conflicts for net8.0...
  [Verbose] Scanning packages for runtime.json files...
  [Verbose] Merging in runtimes defined in package/Microsoft.NETCore.Targets 1.1.3.
  [Verbose] Merging in runtimes defined in package/Microsoft.NETCore.Platforms 7.0.4.
  [Verbose] Restoring packages for net8.0/win-x64...
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.diagnostics.tracing/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.diagnostics.tracing/4.3.0/runtime.any.system.diagnostics.tracing.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.diagnostics.debug/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.diagnostics.debug/4.3.0/runtime.win.system.diagnostics.debug.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.net.primitives/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.net.primitives/4.3.0/runtime.win.system.net.primitives.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.microsoft.win32.primitives/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.microsoft.win32.primitives/4.3.0/runtime.win.microsoft.win32.primitives.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.collections/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.collections/4.3.0/runtime.any.system.collections.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.globalization/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.globalization/4.3.0/runtime.any.system.globalization.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.net.sockets/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.net.sockets/4.3.0/runtime.win.system.net.sockets.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.net.nameresolution/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.net.nameresolution/4.3.0/system.net.nameresolution.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/4.3.0/system.security.principal.windows.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.security.claims/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.security.claims/4.3.0/system.security.claims.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.resources.resourcemanager/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.resources.resourcemanager/4.3.0/runtime.any.system.resources.resourcemanager.4.
  3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.runtime.handles/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.runtime.handles/4.3.0/runtime.any.system.runtime.handles.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.text.encoding/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.text.encoding/4.3.0/runtime.any.system.text.encoding.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.threading.tasks/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.threading.tasks/4.3.0/runtime.any.system.threading.tasks.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.diagnostics.tools/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.diagnostics.tools/4.3.0/runtime.any.system.diagnostics.tools.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.globalization.calendars/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.globalization.calendars/4.3.0/runtime.any.system.globalization.calendars.4.3.0.
  nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.reflection.extensions/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.reflection.extensions/4.3.0/runtime.any.system.reflection.extensions.4.3.0.nupk
  g
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.reflection.primitives/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.reflection.primitives/4.3.0/runtime.any.system.reflection.primitives.4.3.0.nupk
  g
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.text.encoding.extensions/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.text.encoding.extensions/4.3.0/runtime.any.system.text.encoding.extensions.4.3.
  0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.threading.timer/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.threading.timer/4.3.0/runtime.any.system.threading.timer.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.console/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.console/4.3.1/runtime.win.system.console.4.3.1.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.io/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.io/4.3.0/runtime.any.system.io.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.io.filesystem/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.io.filesystem/4.3.0/runtime.win.system.io.filesystem.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.reflection/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.reflection/4.3.0/runtime.any.system.reflection.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.runtime/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.runtime/4.3.0/runtime.any.system.runtime.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.private.uri/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/system.private.uri/4.3.0/system.private.uri.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.runtime.extensions/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.win.system.runtime.extensions/4.3.0/runtime.win.system.runtime.extensions.4.3.0.nupkg
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.runtime.interopservices/index.json
  [Information]   CACHE https://api.nuget.org/v3-flatcontainer/runtime.any.system.runtime.interopservices/4.3.0/runtime.any.system.runtime.interopservices.4.3.0.
  nupkg
  [Verbose] Resolving conflicts for net8.0/win-x64...
  [Verbose] Acquiring lock for the installation of System.Security.Claims 4.3.0
  [Verbose] Acquired lock for the installation of System.Security.Claims 4.3.0
  [Verbose] Acquiring lock for the installation of System.Security.Principal.Windows 4.3.0
  [Verbose] Acquired lock for the installation of System.Security.Principal.Windows 4.3.0
  [Verbose] Acquiring lock for the installation of System.Net.NameResolution 4.3.0
  [Verbose] Acquired lock for the installation of System.Net.NameResolution 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Threading.Timer 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Threading.Timer 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Reflection.Extensions 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Reflection.Extensions 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.win.System.Net.Sockets 4.3.0
  [Verbose] Acquired lock for the installation of runtime.win.System.Net.Sockets 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.win.System.Net.Primitives 4.3.0
  [Verbose] Acquired lock for the installation of runtime.win.System.Net.Primitives 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Diagnostics.Tracing 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Diagnostics.Tracing 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Diagnostics.Tools 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Diagnostics.Tools 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.win.Microsoft.Win32.Primitives 4.3.0
  [Verbose] Acquired lock for the installation of runtime.win.Microsoft.Win32.Primitives 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Text.Encoding.Extensions 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Text.Encoding.Extensions 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Globalization.Calendars 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Globalization.Calendars 4.3.0
  [Verbose] Acquiring lock for the installation of System.Private.Uri 4.3.0
  [Verbose] Acquired lock for the installation of System.Private.Uri 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Reflection.Primitives 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Reflection.Primitives 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Runtime.Handles 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Runtime.Handles 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Resources.ResourceManager 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Resources.ResourceManager 4.3.0
  [Verbose] Running restore with 4 concurrent jobs.
  [Verbose] Reading project file StrideNugetResolver.json.
  [Information] Restoring packages for StrideNugetResolver.json...
  [Verbose] Restoring packages for .NETCoreApp,Version=v8.0...
  [Verbose] Resolving conflicts for net8.0...
  [Verbose] Scanning packages for runtime.json files...
  [Verbose] Merging in runtimes defined in package/Microsoft.NETCore.Targets 1.1.3.
  [Verbose] Merging in runtimes defined in package/Microsoft.NETCore.Platforms 7.0.4.
  [Verbose] Restoring packages for net8.0/win-x64...
  [Verbose] Resolving conflicts for net8.0/win-x64...
  [Verbose] Acquiring lock for the installation of System.Security.Claims 4.3.0
  [Verbose] Acquired lock for the installation of System.Security.Claims 4.3.0
  [Verbose] Acquiring lock for the installation of System.Security.Principal.Windows 4.3.0
  [Verbose] Acquired lock for the installation of System.Security.Principal.Windows 4.3.0
  [Verbose] Acquiring lock for the installation of System.Net.NameResolution 4.3.0
  [Verbose] Acquired lock for the installation of System.Net.NameResolution 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Threading.Timer 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Threading.Timer 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Reflection.Extensions 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Reflection.Extensions 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.win.System.Net.Sockets 4.3.0
  [Verbose] Acquired lock for the installation of runtime.win.System.Net.Sockets 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.win.System.Net.Primitives 4.3.0
  [Verbose] Acquired lock for the installation of runtime.win.System.Net.Primitives 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Diagnostics.Tracing 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Diagnostics.Tracing 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Diagnostics.Tools 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Diagnostics.Tools 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.win.Microsoft.Win32.Primitives 4.3.0
  [Verbose] Acquired lock for the installation of runtime.win.Microsoft.Win32.Primitives 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Text.Encoding.Extensions 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Text.Encoding.Extensions 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Globalization.Calendars 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Globalization.Calendars 4.3.0
  [Verbose] Acquiring lock for the installation of System.Private.Uri 4.3.0
  [Verbose] Acquired lock for the installation of System.Private.Uri 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Reflection.Primitives 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Reflection.Primitives 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Runtime.Handles 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Runtime.Handles 4.3.0
  [Verbose] Acquiring lock for the installation of runtime.any.System.Resources.ResourceManager 4.3.0
  [Verbose] Acquired lock for the installation of runtime.any.System.Resources.ResourceManager 4.3.0

C:\Users\Vacla\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive\Stride.Core.Assets.CompilerApp.targets(153,5): error MSB3073: The comman
d ""C:\Users\Vacla\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive\..\lib\net8.0\Stride.Core.Assets.CompilerApp.exe"  --disable-auto-co
mpile --project-configuration "Debug" --platform=Windows --project-configuration=Debug --compile-property:StrideGraphicsApi=Direct3D11 --output-path="C:\Examples
\Example01\bin\Debug\net8.0\data" --build-path="C:\Examples\Example01\obj\stride\assetbuild\data" --package-file="C:\Examples\Example01\Example01.csproj" --msbui
ld-uptodatecheck-filebase="C:\Examples\Example01\obj\Debug\net8.0\stride\assetcompiler-uptodatecheck"" exited with code 1. [C:\Examples\Example01\Example01.cspro
j]

Build FAILED.

C:\Users\Vacla\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive\Stride.Core.Assets.CompilerApp.targets(153,5): error MSB3073: The comman
d ""C:\Users\Vacla\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive\..\lib\net8.0\Stride.Core.Assets.CompilerApp.exe"  --disable-auto-co
mpile --project-configuration "Debug" --platform=Windows --project-configuration=Debug --compile-property:StrideGraphicsApi=Direct3D11 --output-path="C:\Examples
\Example01\bin\Debug\net8.0\data" --build-path="C:\Examples\Example01\obj\stride\assetbuild\data" --package-file="C:\Examples\Example01\Example01.csproj" --msbui
ld-uptodatecheck-filebase="C:\Examples\Example01\obj\Debug\net8.0\stride\assetcompiler-uptodatecheck"" exited with code 1. [C:\Examples\Example01\Example01.cspro
j]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.47

Additional context Add any other context about the problem here.

VaclavElias commented 2 months ago

I did a few more tests for code only simple project.

image

Even though there is no mentioned package system.security.cryptography.pkcs 6.0.0

image
VaclavElias commented 2 months ago

I guess, something changed in our configurations in the last 2 releases, as previously, I didn't need to do this.

When I add this to the code only project <RuntimeIdentifier>win-x64</RuntimeIdentifier> all references are resolved including the package System.Security.Cryptography.Pkcs.

VaclavElias commented 2 months ago

Fixed with https://github.com/stride3d/stride-community-toolkit/pull/134.

Some notes from Discord:

I was able to debug the error but I wasn't able to find the issue itself because it happens in the NuGet library itself. I moved on and these are the suggetions for the toolkit for now:

Anywhere we reference Stride.Core.Assets.CompilerApp we have to add also <RuntimeIdentifier>win-x64</RuntimeIdentifier> which makes it Windows only.

Kryptos-FR commented 1 month ago

This shouldn't be necessary anymore with #2279.

VaclavElias commented 1 month ago

Looking forward to test it 🙂

azeno commented 4 weeks ago

Running into the same issue over here. It's easily reproducible after deleting the .nuget folder in your user folder. After that a command line build of a Stride based project fails.

Basically the assembly resolver installed by Stride.NugetResolver onto the Stride.Core.Assets.CompilerApp leads to a package restore which might start downloading packages and in turn verifying them. That verify call can be seen in the above posted callstack. It tries to load System.Security.Cryptography.Pkcs.dll which is not present in the exe folder (.nuget\packages\stride.core.assets.compilerapp\4.2.0.2121\lib\net8.0 in my case). After copying that file to that location manually the compiler app ran successfully.

How can we make sure that file (System.Security.Cryptography.Pkcs.dll) is bundled with the nuget package?

VaclavElias commented 4 weeks ago

My issue was related to the toolkit and code-only. What was your scenario?

azeno commented 4 weeks ago

We use Stride in vvvv. Users can export applications which lead to kind of code-only projects.

VaclavElias commented 4 weeks ago

I see! So you came across this issue independently, which is great because I though it is a toolkit related. Thanks. I wasn't able to fix it myself.

Eideren commented 3 weeks ago

Had to revert the fix mentioned above, see #2317