Closed andrevlins closed 8 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.
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.
Forgot to mention the visual studio version:
@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.
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.
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.
Thanks @philliphoff I'll try side-by-side
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: 'Microsoft.VisualStudio.Containers.Tools.Common.Package' Description: Unable to cast object of type 'Dapr.VisualStudio.Projects.ProjectHierarchy' to type 'Microsoft.VisualStudio.Shell.Interop.IVsBuildPropertyStorage'.
System.InvalidCastException: Unable to cast object of type 'Dapr.VisualStudio.Projects.ProjectHierarchy' to type 'Microsoft.VisualStudio.Shell.Interop.IVsBuildPropertyStorage'.
 at Microsoft.VisualStudio.Containers.Tools.Common.HierarchyBase.GetMSBuildProperty(String propertyName, String configurationName, _PersistStorageType storageType)
 at Microsoft.VisualStudio.Containers.Tools.Common.Hierarchy.<GetMSBuildPropertyUIAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Containers.Tools.Common.Hierarchy.<HasContainerTargetsUIAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Containers.Tools.Extensions.Services.Project.ContainerToolsProjectProvider.<>c__DisplayClass3_1.<<GetContainerProjects>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Containers.Tools.Extensions.Services.Project.ContainerToolsProjectProvider.<>c__DisplayClass3_0.<<GetContainerProjects>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
 at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
 at Microsoft.VisualStudio.Containers.Tools.Extensions.Services.Project.ContainerToolsProjectProvider.GetContainerProjects(IEnumerable`1 hierarchies)
 at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
 at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
 at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
 at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
 at Microsoft.VisualStudio.Containers.Tools.Extensions.ExtensionsPackage.<>c__DisplayClass7_0.<InitializeUIContextSubscriptionAsync>g__AreContainerProjectsBeingDebugged|0()
 at Microsoft.VisualStudio.Containers.Tools.Extensions.ExtensionsPackage.<InitializeUIContextSubscriptionAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Containers.Tools.Extensions.ExtensionsPackage.<InitializeAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass21_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
 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:
Warning message:
Logs showing application running:
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.)?
@andrevlins FYI, I've built/published a new version of the extension that works around the Container Tools issue.
Closing as resolved (with updated links and a workaround for the Container Tools issue).
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.