visual-studio-extensions

Custom test adapter installed via NuGet isn't discovering tests

大兔子大兔子 提交于 2019-12-08 06:26:27
问题 I'm trying to install a custom test adapter via NuGet, but it seems like VS isn't recognizing it. I've looked through the code in Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer, so I've realized the dll has to end with *.TestAdapter.dll. Using that name makes vstest.console work for me when I specify /TestAdapterPath, so I'm not sure why the VS2013 test window isn't showing my tests. The adapter does work when installed by copying the relevant files to C:\Program

How to integrate my own structural annotations engine in the Entity Framework designer?

核能气质少年 提交于 2019-12-08 05:44:10
问题 In the accepted answer to this SO question there is an explanation about structural annotations , a way to customize the data on the EDMX files generated by the Entity Framework designer. This feature is used by the Portable Extensible Metadata framework in order to add validation information to the entities defined in an EF model, by adding extra entries to the "Properties" window of the created entities and its properties. My question is: what should I do if I want to create my own custom

Visual Studio Extension: How to get the line on which Context Menu was called?

会有一股神秘感。 提交于 2019-12-08 05:22:55
问题 I would like to create a VS extension in which I need to know the line number the menu was called on. I found a VisualBasic implementation with a macro that seems to do this, but I don't know how to start this in C#. The goal would be to know the exact number of the line the ContextMenu was called on to put a placeholder icon on it just like a break point. Useful links are appreciated since I couldn't find much on this topic. 回答1: You could create a VSIX project and add a Command item in your

Custom Test Adapter is not showing tests on Test Explorer

北战南征 提交于 2019-12-08 01:14:39
问题 I am trying to implement a custom Test Adapter, all the files are bellow: TSTestDiscoverer.cs TSTestExecutor.cs TSTestContainer.cs TSTestContainerDiscoverer.cs VsSolutionHelper.cs from XMLTestDiscoverer source code Using vstest.console.exe /listdiscoverers /usevsixextensions:true I confirmed that the extension is installed and it is listed on the test discoverers. Running vstest.console.exe file.ts I confirmed that both TSTestDiscoverer and TSTestExecutor are working correctly. Now I want to

Visual Studio SDK - How to add a margin glyph on command invoked?

和自甴很熟 提交于 2019-12-07 23:14:02
问题 How can I modify this sample: https://msdn.microsoft.com/en-us/library/ee361745.aspx to have glyphs added to the margin when a button I added is clicked? I have a button which creates a special kind of breakpoint. I would like this kind to be recognized by my own margin glyph. So I wrote the GetTags method in my Tagger class as follows: IEnumerable<ITagSpan<MyBreakpointTag>> ITagger<MyBreakpointTag>.GetTags(NormalizedSnapshotSpanCollection spans) { if (BreakpointManager != null) { DTE2 ide =

ElementHost blocks mouse events

非 Y 不嫁゛ 提交于 2019-12-07 22:46:29
问题 NOTE: I AM TRYING TO SOLVE THE MOUSE ISSUE, NOT THE KEYBOARD PROBLEM, WHICH IS ALREADY SOLVED So I am creating a Visual Studio 2015 extension, working on the Options pages. I am using WPF, so I use ElementHost to host a UserControl. At first it wasn't receiving keyboard events, so I implemented the solution at: WPF TextBox not accepting Input when in ElementHost in Window Forms A quick run down of the solution: A) on the UserControl's Loaded event, I do: var s = HwndSource.FromVisual(this) as

HowTo get all interfaces types from visual studio solution?

时光总嘲笑我的痴心妄想 提交于 2019-12-07 18:08:49
问题 I'm trying to write an extension to visual studio. I need to get a list of all the interfaces types found in all the projects in the current opened solution . So far i have tried doing this using the EnvDev namespace. Is there a way of doing this without parsing the project's .cs files ? Thanks, Chai. 来源: https://stackoverflow.com/questions/13051397/howto-get-all-interfaces-types-from-visual-studio-solution

How to integrate my own structural annotations engine in the Entity Framework designer?

风流意气都作罢 提交于 2019-12-07 18:00:28
In the accepted answer to this SO question there is an explanation about structural annotations , a way to customize the data on the EDMX files generated by the Entity Framework designer. This feature is used by the Portable Extensible Metadata framework in order to add validation information to the entities defined in an EF model, by adding extra entries to the "Properties" window of the created entities and its properties. My question is: what should I do if I want to create my own custom structural annotations engine? That is, I want Visual Studio to show some extra entries in the

Programmatically specify Private Extension Gallery in Visual Studio 2012

拟墨画扇 提交于 2019-12-07 14:03:08
问题 One of the newest features in VS 2012 is the ability to create Private Extension Galleries, which allow you to build your own extension repositories and not have to publish them to the world (internal company tools, etc.). I've successfully created one as described in the MSDN blog I referenced, but I'm wondering if anyone knows of a way to programmatically set the details of the gallery - the name and URL, and then "Apply" it - so that each person who wants to access it doesn't have to

How to use Bundler & Minifier tool in Visual Studio 2015 [closed]

折月煮酒 提交于 2019-12-07 09:09:00
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . Recently, I use ASP.NET Core to develop my project. I have a question like that: there is many css and js file I want refer in my View page, so If it is exist a tool that can combine some css or js to one. It is like following <link href="~/Content/css/a1.css" rel="stylesheet" asp-append-version=