stride3d / stride3d/stride

[VS] Locally built VS extension does not probe for local nuget sources when retrieving Stride.VisualStudio.Commands version

Open
#2,908 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Extension bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type/Version: Local latest as of writing

Platform(s): Visual Studio

Describe the bug
Looking at VS's output when using a locally built extension shows an exception:

System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Could not restore Stride.VisualStudio.Commands 4.3.0.1, this visual studio extension may fail to work properly without it. To fix this you can either build Stride.VisualStudio.Commands or pull the right version from NuGet manually
   at Stride.VisualStudio.Commands.StrideCommandsProxy.<FindStrideSdkDir>d__16.MoveNext()
[...]

To Reproduce
Steps to reproduce the behavior:

  1. Build the VS extension locally and make sure the version number used is not hosted already registered on nuget
  2. Install said extension
  3. Open a SDSL file with VS
  4. Notice the exception being logged in the output pane

Expected behavior
No exceptions

Log and callstacks

System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Could not restore Stride.VisualStudio.Commands 4.3.0.1, this visual studio extension may fail to work properly without it. To fix this you can either build Stride.VisualStudio.Commands or pull the right version from NuGet manually
   at Stride.VisualStudio.Commands.StrideCommandsProxy.<FindStrideSdkDir>d__16.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Stride.VisualStudio.Commands.StrideCommandsProxy.GetProxy()
   at Stride.VisualStudio.Shaders.ShaderKeyFileGenerator.<>c__DisplayClass3_0.<GenerateCode>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Stride.VisualStudio.Shaders.ShaderKeyFileGenerator.GenerateCode(String inputFileName, String inputFileContent)
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Could not restore Stride.VisualStudio.Commands 4.3.0.1, this visual studio extension may fail to work properly without it. To fix this you can either build Stride.VisualStudio.Commands or pull the right version from NuGet manually
   at Stride.VisualStudio.Commands.StrideCommandsProxy.<FindStrideSdkDir>d__16.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Stride.VisualStudio.Commands.StrideCommandsProxy.GetProxy()
   at Stride.VisualStudio.Shaders.ShaderKeyFileGenerator.<>c__DisplayClass3_0.<GenerateCode>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.InvalidOperationException: Could not restore Stride.VisualStudio.Commands 4.3.0.1, this visual studio extension may fail to work properly without it. To fix this you can either build Stride.VisualStudio.Commands or pull the right version from NuGet manually
   at Stride.VisualStudio.Commands.StrideCommandsProxy.<FindStrideSdkDir>d__16.MoveNext()<---
<---

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Stride.VisualStudio.Commands.StrideCommandsProxy.FindStrideSdkDir shown in the call stack and inspect how it restores Stride.VisualStudio.Commands. Reproduce with a locally built extension whose version is absent from NuGet, then verify local NuGet sources are probed and no exception is logged when opening an SDSL file.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.