vsix

Visual Studio extension could not find a required assembly

橙三吉。 提交于 2019-12-07 04:44:40
问题 I wrote an extension for Visual Studio 2013. Because of bloody ComboBox bug, I had to include System.Windows.Interactivity to my project. To add more details: <Project> uses additional solution assembly, say <Project>.Editor, which contains the physical editor. <Project>.Editor references System.Windows.Interactivity <Project> references System.Windows.Interactivity as well. In fact, I'm using nuget to load Expression.Blend.Sdk package (it's compatible with WPF 4.5) Effect: When part of

calling Roslyn from VSIX command

老子叫甜甜 提交于 2019-12-07 02:32:08
问题 What is best way to obtain Roslyn's SyntaxTree from EnvDTE.ProjectItem? I found some method for the other way (Roslyn's Document into ProjectItem). I got VSIX command called from opened document and I'd like to experiment with Roslyn's syntax tree there. This code works, but looks awkward to me: var pi = GetProjectItem(); var piName = pi.get_FileNames(1); var componentModel = (IComponentModel)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SComponentModel)); var workspace =

VSIX extension - Change Path of DLL

痴心易碎 提交于 2019-12-06 16:06:29
I've created a Visual Studio Extension (VSIX) with Visual Studio 2013. In this extension I have a reference to another class library (DLL) which I created. This DLL will be placed in the extension Folder correctly after installing the extension Extension Folder is C:\Users\username\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\1oqfh4o4.2y5\ But I need this dll also in the installing directory of the Visual Studio -> C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE If I do not copy the dll into the Visual Studio folder I get an exception that the extension cannot find the

How to use wizard assemblies attached in VsixMainfest in project templates?

元气小坏坏 提交于 2019-12-06 15:56:59
I have a vsixmanifest file that has an assembly attribute. The file looks like: <Content> <ProjectTemplate>Solution</ProjectTemplate> <Assembly AssemblyName="SolutionNameWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1c39bfcc-223f-4c12-a5dc-55eeca7c61f7"> Assemblies\SolutionNameWizard.dll </Assembly> I know that the assembly name and public key are correct. Now, I am trying to use this assembly in one of my templates. Right now I have: <WizardExtension> <Assembly>SolutionNameWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1c39bfcc-223f-4c12-a5dc-55eeca7c61f7</Assembly>

how can i add a new icon to a Visual Studio 2010 extension?

点点圈 提交于 2019-12-06 15:05:18
i'm developing a Visual Studio 2010 extension, i already have a toolbar inside my window. on that toolbar i have a button that i want to give an icon - my own icon! I've read this article and it is great but... it explains how to replace the icons. i want to add an additional icon. how do i achieve that? First, add the bitmap and set its build action to Resource Remember, shocking pink = transparent (damn you, old school!) Then, in your vsct file, add the image to the bitmaps section <Bitmaps> <Bitmap guid="AddSampleData.bmpGuid" href="..\Button Bitmaps\AddSampleData.bmp" usedList=

Visual Studio Extension: Access VS Options from arbitrary DLL

雨燕双飞 提交于 2019-12-06 14:22:46
I'm currently developing my first VS extension, which needs to provide some options to the user. Following https://msdn.microsoft.com/en-us/library/bb166195.aspx , it was rather easy to come up with my own options page. However, I have not yet found out how to read my options. The solution structure of my extension is as follows: MySolution MyProject (generates a DLL from C# code) MyProjectVSIX Following the tutorial cited above, I have added a VS Package to my VSIX project and configured it as described. As a result, my options page with my options is shown under Tools/Options. Nice! Here's

How can I automatically enable a VSIX extension, when installing?

别来无恙 提交于 2019-12-06 11:09:39
I've created a VSIX package that I install via a WIX-generated MSI. However, when I install it, and look at it in VS2010, in the Tools > Extension Manager menu, it is [Disabled] and I need to enable it manually. How can I avoid this? ** EDIT ** Here's what I did: I tried adding capturing the VSInstallDir from the registry like this: <Property Id="VSINSTALLER"> <RegistrySearch Id="VSInstallRegistry" Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0" Name="InstallDir" Type="directory" /> I added the directory structure under target-dir like this: <Directory Id="TARGETDIR" Name=

How to remove a list of SyntaxNode from the Document using Roslyn code fix provider APIs?

浪子不回头ぞ 提交于 2019-12-06 06:24:45
I'm having a custom generated variable declaration using SyntaxFactory.VariableDeclaration and a list of SyntaxNode 's collected according to some conditions. I did the following: Modify the node var newRoot = root.ReplaceNode(expression, newVariableDeclaration) This successfully modified the node with the newVariableDeclaration . In a loop remove the nodes corresponding to the ones present in the list foreach (var listObject in listObjects) { newRoot = newRoot.RemoveNode(listObject, SyntaxRemoveOptions.KeepNoTrivia); } This doesn't change the newRoot and all the listObject required to be

Single File Generator not working for .NET Standard Projects in Visual Studio 2017

核能气质少年 提交于 2019-12-05 19:59:21
I've implemented a Single File Generator based off the template [1] (that compiles into an installable VSIX output, including the automatic registration of the components) and: It works for classic .NET projects in VS 2015 and VS2017; It works for .NET Core projects in VS2017; But doesn't work for .NET Standard projects in VS2017. All of the HasCustomTool.xml files have the same configuration, all of them have the 'Custom Tool' attribute specified. When I look at the .csproj files, I can see that they are different. The (working) content of the DotNetCore.csproj file is: <ItemGroup> <Compile

Adding Iso8601TimeSpanConverter to JsonConverter list throws ArrayTypeMismatch exception

给你一囗甜甜゛ 提交于 2019-12-05 19:48:55
I'm using AutoRest to auto generate a c# class for a REST API from a Swagger definition file. The problem is that when the client class initialize methos is executed, it throws an ArrayTypeMismatch exception in the following code: SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new