Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Yann Duran
@yannduran
why not do it all a a WPF usercontrol then?
you could still use a WPF toolbar, and then you can style that text button to be non-clickable
Casey Banner
@kcbanner_twitter
I had tried that, but I wanted the commands to have a consistent look as the context menus / menus
And re-implementing all the toggle buttons and stuff in WPF trying to get them to match in behavior didn't seem worth it just for this text.
Yann Duran
@yannduran
you wouldn't have to reimplement them, just use styles :-P
but fair enough, i was just trying to help with suggestions
Casey Banner
@kcbanner_twitter
:thumbsup: thanks! I think I may add a WPF status bar for the progress and move the text there.
Yann Duran
@yannduran
good idea
Vyacheslav Avdeev
@lsoft
may be someone knows... is there any plans to upgrade C# layer of VS to net5/6? may be for future VS202x? from an outsider's point of view WPF is not a block issue anymore, does additional huge issues exists? (I am just wondering)
CyrusNajmabadi
@CyrusNajmabadi
Future plans for VS can't really be discussed.
yangdehua1981
@yangdehua1981
Hello everyone, how to get its warning level through a warning code?
Johan Larsson
@JohanLarsson
Not sure how you mean, do you ant default severity?
If so maybe source diving is the best way
Dan O'Brien
@InTheCloudDan
does Visual Studio provide out of the box APIs to store data in Credential Vault? I'm looking to have a Setting that stores an API key
Nathan H. Bean
@zombiepaladin
Is there a way of retrieving the user identity in an extension? I'm working on a student homework submission extension, and all our students have 360 accounts.
Neil Henderson
@bluetarpmedia
@InTheCloudDan @zombiepaladin Assuming you're writing C# VSIX extensions, you have access to the full .NET framework, plus Win32 via pinvoke. You can write code just like any desktop app.
@InTheCloudDan So you could use the Win32 Credential Management API or a wrapper like this nuget package: https://www.nuget.org/packages/CredentialManagement/
@zombiepaladin Maybe this will return what you need? Environment.UserDomainName
Dan O'Brien
@InTheCloudDan
thanks @bluetarpmedia !
yangdehua1981
@yangdehua1981
Hello everyone, how to get the coordinates of the code line
Matt Lacey
@mrlacey
@yangdehua1981 can you provide more context? Do you mean a Span within the document? or position relative to the editor window? or something else?
Vyacheslav Avdeev
@lsoft
what's the best and recommended way to install one specific nuget FROM my vsix? (I need to install one specific nuget to the project of opened solution from a Command in my vsix extension); any ideas are welcome!
Vyacheslav Avdeev
@lsoft
IVsPackageInstaller2? if so, it looks like there is no async version exists. should I run it from main thread?
jquery2005
@jquery2005
@lsoft Use the command to call and install nuget (nuget install) package address?
Vyacheslav Avdeev
@lsoft
@jquery2005 yeah, may be. or to prefer IVsPackageInstaller2? what's the recommended way? I don't know :)
I guess, VS-way looks preferable than the direct command...
Vyacheslav Avdeev
@lsoft
oh! thanks a lot, @SQL-MisterMagoo !
gbenshim
@gbenshim
Hi guys, i'm trying to figure out if its possible to set a default desiner (maybe default EditorFactory) per project type, i can see an example with ProvideXmlEditorChooserDesignerView, the registry keys that are being added to the pkgdef seem to be xml related. Is it possible to create a chooser like for a custom file type in a custom project? Any information would be appriciated! Thanks!
Yann Duran
@yannduran
@lsoft don't use System.Threading.ThreadPool.QueueUserWorkItem(), anymore, have a read of Cookbook for Visual Studio for more up-to-date ways of doing it
Vyacheslav Avdeev
@lsoft
how interesting!!! @yannduran thanks!
Yann Duran
@yannduran
@lsoft I hope you find it helpful
gbenshim
@gbenshim
Any lead in regards to a possible way to control the default editor, regardless or in regards to project type would be great
yangdehua1981
@yangdehua1981
@mrlacey I already know how to do it. Thank you for your reply
Jakub Míšek
@jakubmisek

Hi everyone - question about VSIX:

We're providing packages for Visual Studio 2017 and 2019 and upon installing it takes a long time to run, moreover, it installs other components than listed in our vsixmanifest (e.g. Microsoft.Net.Core.SDK.2.1 which frequently fails to install).

  • Is there a way to "debug" the VSIX?
  • How to make the installation faster/simpler, not invoking any downloads nor other packages installation?
Yann Duran
@yannduran
@jakubmisek to debug the VSIX, you simply press F5
Jakub Míšek
@jakubmisek
@yannduran I mean the installation process itself. We are Visual Studio partners and building Visual Studio extensions since 2005, but the new VSIX installer is magical
Yann Duran
@yannduran
Oh, not that I know of, no
Jakub Míšek
@jakubmisek
@yannduran thank you, although any idea would be appreciated :)
Yann Duran
@yannduran
@jakubmisek what's probably happening is one of the components listed in you vsixmanifest is dependent on elements that you haven't directly specified
Jakub Míšek
@jakubmisek

@yannduran this is our dependencies section of .vsixmanifest:

    <Dependencies>
        <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" Version="4.6" />
        <Dependency IsRequired="false" Version="[15.0,16.0)" d:Source="Installed" Id="TestWindow.Microsoft.0771d463-d74d-4e95-aac2-39d3c7ec1f97" DisplayName="Test Explorer"/>
    </Dependencies>
    <Prerequisites>
        <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
        <Prerequisite Id="Microsoft.VisualStudio.Component.Web" Version="[15.0,16.0)" DisplayName="ASP.NET and web development tools" />
    </Prerequisites>

Not sure which one might cause VS to always attempt to install .NET Core SDK 2.1. It only happens on VS 2017 tho.

Yann Duran
@yannduran

for a start, you can get rid of the Microsoft.Framework.NDP dependency, it's not needed anymore - but it won't be the source of your problem though

it's possible that Microsoft.VisualStudio.Component.Web requires Microsoft.Net.Core.SDK.2.1 to be installed

Jakub Míšek
@jakubmisek
thanks! we'll try removing that. It's there basically since 2012 but now Web is always included, as well as .NET Framework always was.
Yann Duran
@yannduran
why is TestWindow.Microsoft.0771d463-d74d-4e95-aac2-39d3c7ec1f97 a dependency?
Jakub Míšek
@jakubmisek
it's a non-required dependency, since we integrate into Test Explorer. This weird dependency ID was taken from Python Tools for Visual Studio (https://github.com/microsoft/PTVS/blob/master/Python/Product/Core/source.extension.vsixmanifest)
Yann Duran
@yannduran
try without it maybe?
Jakub Míšek
@jakubmisek
so basically we'll try to remove all the dependencies, and check if it fixes it :)
Yann Duran
@yannduran
it's always best to not have anything in there that you don't know you need, especially when you're experiencing weird problems
Veselin Ivanov
@vvatkov
Anyone using IToolboxService? I use GetToolboxItems method to get WinForms toolbox items. However, the service does not work with .NET Core 3.1 items that are populated via a NuGet package. It there an alternative?
Jakub Míšek
@jakubmisek
@yannduran interestingly, vsix installer fails with System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.Setup.PackageFailureException: Package 'Microsoft.Net.Core.SDK.2.1' failed to install even if the vsixmanifest has no dependencies or prerequisites :) happens on some installations on VS 2017