vsx

Is it possible to refresh WCF service reference from VS2010 addin?

邮差的信 提交于 2019-12-03 02:49:11
I want to "simulate" the Right click/Update service reference command in a VS2010 addin. I have a reference to the containing (Silverlight...) project, I know the name of the service reference and the url of the service. I've found this: http://dedjo.blogspot.com/2007/03/adding-web-references-to-your-vs.html , but it only works for asmx (it uses System.Web.Services instead of System.ServiceModel), not wcf. Is there any choice but call svcutil from code? if so, how? (do I use svcutil or slsvcutil? How do I call it from inside the addin?) thanks I believe the visual studio command for this is "

Visual Studio plug-ins development, first steps

本小妞迷上赌 提交于 2019-12-02 23:10:40
I would like to make a plug-in for visual studio... But I have no idea where to start. While it was quite easy to find guides for Eclipse plug-in development, I'm having troubles to find a good guide for VS plug-in development. I guess what I'm trying to ask here, is where do I start? I suggest to start here: http://www.mztools.com/resources_vsnet_addins.aspx This is great set of resource for VS add-in developers. Creating VS add-in is quite easy. Some keywords if you want to search for more: VS add-in (plugin is not very used), VS extensibility, VS automation. The best place to start for

How to access project code meta data?

橙三吉。 提交于 2019-12-02 17:49:08
问题 In my VSPackage I need to replace reference to a property in code with its actual value. For example public static void Main(string[] args) { Console.WriteLine(Resource.HelloWorld); } What I want is to replace "Resource.HelloWorld" with its actual value - that is, find class Resource and get value of its static property HelloWorld. Does Visual Studio expose any API to handle code model of the project? It definitely has one, because this is very similar to common task of renaming variables. I

Change the contents of a file ProjectItem within a Project in a Visual Studio 2015 Extension?

孤街醉人 提交于 2019-12-02 17:28:20
问题 How do I change the contents of a file/ ProjectItem within a given Project ? I would like to replace all of its contents with a string. 回答1: there is have a resolution of this question? I want to make some changes in ProjectItem (CS file) by using VSIX package, and an only single way to do this that I see right now - it's read this file by FullPath , make changes, and then save changes. I know that in ProjectItem have FileCodeModel property, but it is null. 来源: https://stackoverflow.com

How to access project code meta data?

我的未来我决定 提交于 2019-12-02 09:45:43
In my VSPackage I need to replace reference to a property in code with its actual value. For example public static void Main(string[] args) { Console.WriteLine(Resource.HelloWorld); } What I want is to replace "Resource.HelloWorld" with its actual value - that is, find class Resource and get value of its static property HelloWorld. Does Visual Studio expose any API to handle code model of the project? It definitely has one, because this is very similar to common task of renaming variables. I don't want to use reflection on output assembly, because it's slow and it locks the file for a while.

How to register my service as a global service or how can I use MEF in my scenario?

淺唱寂寞╮ 提交于 2019-12-02 07:39:57
I would like to create my own service with global visibility. To implement that, I followed this sample solution. Everything goes well, I can call my service within a class, which extends from the Package abstract class, in this way: public class ClientPackage : Package { private void GetGlobalServiceCallback(object sender, EventArgs args) { IMyGlobalService service = GetService(typeof(SMyGlobalService)) as IMyGlobalService; } } Because I'm in a Package, I can easily call GetService and I can get my service. But what about if I want to get my service from a class, which is not extends the

How get the current running Visual Studio installation path from VSPackage

ぐ巨炮叔叔 提交于 2019-12-01 06:41:47
I've created a VSPackage which should copy some XML schema files to Visual Studio's installation path: %VS install path% \Xml\Schemas . I have multiple Visual Studios installed on my machine: Visual Studio 2013 Professional. Visual Studio 2015 Community Edition. Visual Studio Express Editions. I need to detect the path to the Visual Studio from which my VSPackage is executing its command. How can I get the current running Visual Studio's installation path in the package? First, I agree with Carlos in that particular point that an extension should never require elevated priviledges. But that

Generate DTOs from Object

吃可爱长大的小学妹 提交于 2019-12-01 04:23:14
I want to auto gen some DTOs from some of my existing objects, I was wondering if there already exist a Resharper, DevExpress or VSX open source to use, I need a tool to look into my code and let me choose which properties I want to include in my DTO and then generate a class based on that... This is kind of a hack but you could use Visual Studio/Resharper to Extract an interface from the class, then create a DTO class and derive from the interface, then use Visual Studio to auto implement the interface members (then, optionally remove the interface). Another opinion would be to use some

How get the current running Visual Studio installation path from VSPackage

假装没事ソ 提交于 2019-12-01 04:12:45
问题 I've created a VSPackage which should copy some XML schema files to Visual Studio's installation path: %VS install path% \Xml\Schemas . I have multiple Visual Studios installed on my machine: Visual Studio 2013 Professional. Visual Studio 2015 Community Edition. Visual Studio Express Editions. I need to detect the path to the Visual Studio from which my VSPackage is executing its command. How can I get the current running Visual Studio's installation path in the package? 回答1: First, I agree

Getting started with Visual Studio 2010 Extensibility - 3 questions

空扰寡人 提交于 2019-12-01 01:30:57
问题 1.) How differs "Visual Studio Package" project from the "VSIX" project? 2.) Where I can find some beginners guides? 3.) Where I can find a overview of the extensibility model or extension points of Visual Studio 2010? Thanks in advance! 回答1: Can you explain what type of extension you want to write? It may change my answers here. Both projects produce a VSIX. the VSIX project just produces an empty one, whereas the package project sets you up with a Managed Package Framework package. Here are