visual-studio-extensions

Current type of the build action from Visual Studio - Microsoft.VisualStudio.Shell.Interop

左心房为你撑大大i 提交于 2019-12-05 23:10:15
In some extension we implement the IVsUpdateSolutionEvents2 and IVsSolutionBuildManager2 used for registering caller with the AdviseUpdateSolutionEvents For example, this called before any build actions have begun: public int UpdateSolution_Begin(ref int pfCancelUpdate) { ... } However, also need getting the status or type of the current build action, for example: build/rebuild/clean/deploy Available & known variants: BuildEvents With the Events.BuildEvents i can subscribe to OnBuildBegin, for example: _buildEvents.OnBuildBegin += new _dispBuildEvents_OnBuildBeginEventHandler((vsBuildScope

HowTo get all interfaces types from visual studio solution?

↘锁芯ラ 提交于 2019-12-05 21:05:16
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

Finding the home directory for a Visual Studio 2010 extension

你。 提交于 2019-12-05 17:09:27
I am making changes to a Visual Studio wizard that creates a project from a template, and needs to add a reference to an assembly to the project that also lives in the extension directory. So I need to set the <hintpath> . I have not been able to figure out how a running VS extension can discover its extension directory, which is a directory name like this: %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\myCompany\myExtension Using System.Reflection.Assembly.GetExecutingAssembly().CodeBase yields: "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\myCompany.myExtension\v4.0_1.0.0.0

Install-Package : The remote name could not be resolved: 'packages.nuget.org' [closed]

感情迁移 提交于 2019-12-05 13:28:54
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . For no reason, I have been getting this error message for a week or so; PM> Install-Package Elmah Install-Package : The remote name could not be resolved

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

試著忘記壹切 提交于 2019-12-05 11:57:01
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="true" /> <link href="~/Content/css/a2.css" rel="stylesheet" asp-append-version="true" /> I want to te result is that: <link href="~/bundles/css/a.min.css" rel="stylesheet" asp-append-version="true" /> Then I search it on Google, I got the tool Bundler& Minifier , an extension in Visual Studio. I want

How to get terminal window inside Visual Studio 2017 / 2019?

感情迁移 提交于 2019-12-05 09:28:57
I was just reading this article - https://devblogs.microsoft.com/dotnet/visual-studio-2019-net-productivity-2/ and noticed in one of the GIF image, she is showing a terminal window inside VS editor itself. It looks like a fully fledged powershell window. How can we get that? Here is a screenshot. How can we get that? The Terminal Window in the video seems to comes from a VS extension Whack Whack Terminal . You can download and install it in your vs2017. (Note:For vs2017, it should be higher versions than 15.6+) For more details(usage and settings) please check Adding a terminal window to

Visual Studio Extension (VSPackage) runs in all Experimental Instances, but does not run after being installed as a .vsix, except in VS2010

允我心安 提交于 2019-12-05 08:50:12
I am writing a Visual Studio extension which targets VS2010, VS2012, and VS2013. It runs and is initialized successfully in each Experimental Instance with no issues. When I install the VSIX generated by the build, it installs in all versions without a problem, but only in VS2010 does it actually execute. In the others it's never instantiated or initialized. There are no exceptions being thrown. Running the non-Experimental instance with the /log flag does not produce any other diagnostic information (other than confirming it is installed, and has a newer version than its counterpart already

How to define classification formats for each theme

北战南征 提交于 2019-12-05 07:00:51
In my editor extension I use custom classification formats for keywords, identifiers and so on. Of course, there are default formats I could use, because then colors (used by syntax highlighting) will be changed in accordance to the selected theme. Since my custom editor also needs additional classification types (for instance a punctuation type), colors for those types won´t change when the user configures another theme (by switching from Dark to Blue theme, for instance). I would like to know how I can proffer theme-specific formats. Xcalibur The best approach I have found to support

Visual Studio IntelliSense for viewing block declarations from the closing brace?

心不动则不痛 提交于 2019-12-05 06:35:34
问题 I'm really curious if anyone knows if Visual Studio's IntelliSense can be configured to display a code block's declaration by hovering over the block's closing brace (or something similar). Rather than having to mark long code blocks with a comment, I would much rather hover over the closing brace to view which block it ends. If what I'm saying isn't clear, imagine you had the code block below: if (typeof(obj) is Int32) { ///...PROGRAM LOGIC... } In this example, if I were to move the caret

Visual Studio 2017 extension - VSToolsPath not working

牧云@^-^@ 提交于 2019-12-04 21:13:02
I'm updating an old Visual Studio extension for VS 2017. It compiles fine from Visual Studio and msbuild in debug and release on my local computer. This is the msbuild command line I am using: msbuild VxCop.sln /p:ToolsHome=C:\ProgramData\chocolatey\bin /p:Configuration=Release /p:Platform="Any CPU" However, on the build machine (TFS Build 2010) calling msbuild.exe with the same command line it fails with this error In order to fix this I am trying to specify VSToolsPath. I've tried various things such as altering the VSToolsPath entry in the .csproj (which seems to not be taken into account