microsoft / vs-dapr

View, manage, and diagnose Dapr services within Visual Studio.
https://dapr.io
MIT License
21 stars 2 forks source link

Can't find extension on VS #7

Closed andrevlins closed 8 months ago

andrevlins commented 9 months ago

I'm following the instructions to install this preview extension but had no success, the extension don't show as you can see on these screenshots.

image

image

image

philliphoff commented 9 months ago

@andrevlins Apologies, but it seems I've let the temporary links to the unofficial feed expire, which might be the cause of your issue. I've generated new builds/links; please try again and let me know if you run into any other issues.

andrevlins commented 9 months ago

Thanks @philliphoff

I managed to install the extension and despite the installation success message, the logs show some incompatibility errors with the visual studio version.

I went to look at the logs after not finding the option to add dapr file to the solution.

dd_VSIXInstaller_20231129082150_2828.log

andrevlins commented 9 months ago

Forgot to mention the visual studio version:

image

philliphoff commented 9 months ago

@andrevlins I see that you're using Visual Studio 17.9; do you see the problem with 17.8? I recall that there are breaking changes in the VSIX format between those versions (for extensions which use certain APIs, such as ours, which seems to be confirmed by the errors in the installation log), and I've not yet done any testing with 17.9.

At some point we may need to move to the 17.9 previews to get some new functionality we need, but I'm loathe to require a non-GA version of VS in order to use our extension. That said, we had to do so while 17.8 was still in preview, so I suppose there is precedent.

andrevlins commented 9 months ago

Unfortunately I cannot use version 17.8 since I am following and trying to collaborate with the .net aspire project and it requires at least 17.9.

I'll try to get time to install 17.8 side by side just to test the extension installation.

philliphoff commented 9 months ago

I use 17.8 and 17.9 side-by-side for working with Aspire as well. While perhaps not super convenient, I found the two versions of VS do work well together. Since there are breaking manifest/APIs changes between 17.8 and 17.9, I don't know viability of supporting both; I'd need to investigate our options there.

andrevlins commented 9 months ago

Thanks @philliphoff I'll try side-by-side

andrevlins commented 9 months ago

Hello @philliphoff

I can generate the dapr.yaml by using Add dapr file menu from the extension.

When a click to run the file (With or Without Debug) the application seems to run but nothing happens except from a warning message from visual studio.

I followed the path of this message and bellow is the message of exception.

Hope this helps.

Error in the file pointed in the warning message:

  <entry>
    <record>496</record>
    <time>2023/12/03 14:38:51.213</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [ExtensionsPackage]Source: &apos;Microsoft.VisualStudio.Containers.Tools.Common.Package&apos; Description: Unable to cast object of type &apos;Dapr.VisualStudio.Projects.ProjectHierarchy&apos; to type &apos;Microsoft.VisualStudio.Shell.Interop.IVsBuildPropertyStorage&apos;.&#x000D;&#x000A;System.InvalidCastException: Unable to cast object of type &apos;Dapr.VisualStudio.Projects.ProjectHierarchy&apos; to type &apos;Microsoft.VisualStudio.Shell.Interop.IVsBuildPropertyStorage&apos;.&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Common.HierarchyBase.GetMSBuildProperty(String propertyName, String configurationName, _PersistStorageType storageType)&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Common.Hierarchy.&lt;GetMSBuildPropertyUIAsync&gt;d__25.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Common.Hierarchy.&lt;HasContainerTargetsUIAsync&gt;d__40.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Extensions.Services.Project.ContainerToolsProjectProvider.&lt;&gt;c__DisplayClass3_1.&lt;&lt;GetContainerProjects&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Extensions.Services.Project.ContainerToolsProjectProvider.&lt;&gt;c__DisplayClass3_0.&lt;&lt;GetContainerProjects&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Extensions.Services.Project.ContainerToolsProjectProvider.GetContainerProjects(IEnumerable`1 hierarchies)&#x000D;&#x000A;   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()&#x000D;&#x000A;   at System.Linq.Enumerable.&lt;SelectManyIterator&gt;d__17`2.MoveNext()&#x000D;&#x000A;   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()&#x000D;&#x000A;   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Extensions.ExtensionsPackage.&lt;&gt;c__DisplayClass7_0.&lt;InitializeUIContextSubscriptionAsync&gt;g__AreContainerProjectsBeingDebugged|0()&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Extensions.ExtensionsPackage.&lt;InitializeUIContextSubscriptionAsync&gt;d__7.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Containers.Tools.Extensions.ExtensionsPackage.&lt;InitializeAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass21_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
    <guid>{D40A86AA-B995-46A6-9C90-02D38AD8637E}</guid>
    <hr>0x80004002 - E_NOINTERFACE</hr>
    <errorinfo></errorinfo>
  </entry>

Visual Studio 17.8.2:

image

Warning message:

image

Logs showing application running:

image

philliphoff commented 9 months ago

When a click to run the file (With or Without Debug) the application seems to run but nothing happens except from a warning message from visual studio.

@andrevlins I can repro the warning; it looks like the Container Tools extension is making assumptions about the Dapr project system that it probably shouldn't; I can look into a workaround for that. That said, it appears that the application otherwise runs as expected. Can you tell me what you were expecting to happen after run/debug (e.g. browser to open, etc.)?

philliphoff commented 9 months ago

@andrevlins FYI, I've built/published a new version of the extension that works around the Container Tools issue.

philliphoff commented 8 months ago

Closing as resolved (with updated links and a workaround for the Container Tools issue).