Quantcast
Channel: Visual Studio Integrate forum
Viewing all 4410 articles
Browse latest View live

VS Package Debugging Issue

$
0
0
I just brought two of my add-ins (C#, VS 2010) into a new VS Package project.  It went quite well and the two commands seem to work the same as they did as add-ins.  I didn't have to change the code at all, except for some minor adjustments because of differences in infrastructure between add-ins and VS packages.

I did encounter one interesting problem which makes debugging these add-ins when inside the VS Package environment impossible.

With add-ins, the DTE2 object is provided as part of the add-in architecture.

With VS Packages, one may obtain the DTE2 object as follows:

DTE2 AppObject = (DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.10.0");

This works just fine for the finished VSIX installed extensions.

Unfortunately, however, when attempting to debug a VS Package, the DTE2 object returned is that of the debug instance of visual studio and not that of the test instance.  When debugging add-ins, on the other hand, the provided DTE2 object is, correctly, that of the test instance of visual studio.

While I understand that it is Microsoft's position that VS Packages are preferable to add-ins, it is clear that not being able to debug a VS Package when the DTE2 object is used, is a serious problem and one, I must add, that does not exist with the deprecated add-in architecture.

Charles S. Cotton


How to extend the property pages of a project in a Visual Studio Extension (VSIX) development?

$
0
0

I was able to extend the Project Property pages of the project created in my Visual Studio Extension project (VSIX), from here.

However, the property pages I obtained from this was like:

But I'd like to get my property pages in this style:

Can someone help me to achieve this? 

C# help would be nice :)

Using the Extensibility --> VSIX Project with a web application - Error TemplateProjectOutputGroup does not exist

$
0
0

I am using Visual Studio 2010 Premium.  I have created a Web Application that I would like to use as a project template.  I am able to successfully use the Export Template Extension to creat the VSIX file.  However, I have the following issues when trying to do it this way.

  • On File -->  New Project dialog, the template only shows up under Visual Basic and not under Web.
  • I don't want to type in all that information every time I want to create a VSIX.

My solution was to add a VSIX Project (Visual Basic --> Extensibility --> VSIX Project) to my solution that contains the Web Application.  Then add a .vstemplate file to my web project so I can fine tune what I want.

I got as far as adding the VSIX project to my solution and I cannot build the project.  I receive the following error.

Description:  The target "TemplateProjectOutputGroup" does not exist in the project.

File: WebApplication.vbproj (This is my VB project file to my web application).

The error goes away when I remove the VSIX project from the solution.  How can I fix this?


Tray

Create project item with the attribute in the project file.

$
0
0

I can easily create a project with an item having the attribute <LogicalName></LogicalName> in the projectTemplate project file by using

   <EmbeddedResource Include="some.xml">
      <SubType>Designer</SubType>
      <LogicalName>LogicalName.xml</LogicalName>
    </EmbeddedResource>

However, if I am creating a project item, there is of course no projectTemplate project file. How do I create a project vsix project item, lets say in CSharp or VisualBasic, that will create the LogicalName attribute for the item? Do I need a wizard to modify the project file? If so please give direction and approach to modifying the project file. Preferably with automatic reloading of project file if possible (without prompt from user). 

Note: vstemplate file only has the following attributes for a project item

<ProjectItem
    SubType="Form/Component/CustomControl/UserControl"
    CustomTool="string"
    ItemType="string"
    ReplaceParameters="true/false"
    TargetFileName="TargetFileName.ext">
        FileName.ext
</ProjectItem>

No LogicalName

If this is not clear, I will attempt to rephrase question.

VSIX development error VSSDK1040: There was a problem enabling the extension with a VSIX identifier of ....

$
0
0

I am developing a VSIX project in VS2013. My current project is a little bit detailed but today I realized that error happens even on a new project.

To find out reason of the problem, I have created a very simple VSIX extension. I just opened new project window and selected Extensibility and then VSIX. After project creation I built project and received this error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(503,5): error VSSDK1040: There was a problem enabling the extension with a VSIX identifier of "0.0.1". The input source is not correctly formatted.




VSPackage Deployment: Custom Installer with VS Gallery Auto Updates

$
0
0

I have a VSPackage with a custom editor. I want it to show up in the solution explorer with a custom icon, which will require a custom deployment step.

Here are my deployment requirements:

  • As explained here, allow users to easily update to new versions of my extension using the Visual Studio Gallery (In VS Tools > "Extensions and Updates" > Updates).
  • As explaned here, I need to run a custom installation step to set up the custom icon in the registry (outside the VS registry hive, which means PKGDEF files can't do it).

As explained here and here, instead of using a VSIX file, I could create a custom installer that places the extension files directly in the user/machine-wide extension folder on the target machine.

Problem is I think the easy extension update process from the VS Gallery would not work. Can I get both of the requirements above? If so, how?

As a workaround, could I check if the icon is set up correctly in the package Initialize method, and if not, run some custom code to set up the registry settings?  In this case I can stick with VSIX deployment and the auto-updates work.

Alternatively, if I create a custom installer that deals with updates and copies new versions of the extension files to the extension folder, how do I register it so that VS "Extensions and Updates" checks the VS Gallery version number for updates?

How do I automate attaching the debugger to a remote process?

$
0
0

I have remote debugging set up and can debug from my host machine (Windows 7, 64-bit, UAC Enabled, with Visual Studio running as Administrator) to my guest machine with no problems at all(Windows 7, 32-bit, Remote Debugger running as a service). Connecting manually using the menu "Attach Process", entering the remote machine and specifying the process works fine.

I want to automate attaching to a remote process using the debugger but I cannot automate it using the code generated by the in-built macro recorder:

Try
Dim dbg2As EnvDTE80.Debugger2 = DTE.Debugger
Dim transAs EnvDTE80.Transport = dbg2.Transports.Item("Default")
Dim dbgeng(2)As EnvDTE80.Engine
d
bgeng(0) = trans.Engines.Item("Managed (v4.0)")
dbgeng(1) = trans.Engines.Item("Native")

Dim proc2As EnvDTE80.Process2 = dbg2.GetProcesses(trans,"TheMachineName").Item("myremoteprocessname.exe")

proc2.Attach2(dbgeng)     

Catch exAs System.Exception

            MsgBox(ex.Message)

EndTry

I get the error:

"The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. Please see Help for assistance".

However, it definitely IS running because I can attach manually. I suspect the problem is with the machine name which is really a qualiifier - can I please ask what qualifier do I need to use when I want to attach to the remote debugger that is running as a service?

Cheers!

Grey Ham

PS: I realize I can set up F5 to do this, but I would prefer to use the extensibility API's...


Blog: http://www.havecomputerwillcode.com/blog

Access ISharePointProjectService from T4 Text Template

$
0
0

I have a Visual Studio 2013 SharePoint solution/project in which I set the "Site URL" to which I want to deploy the project (standard functionality). I would like to consume the project's "Site URL" property in a T4 Text Template.  However, it appears that this may not be possible because T4 is (apparently) not running as a Visual Studio add-in.  (Seehttp://msdn.microsoft.com/en-us/library/ee471432.aspx.)

In other words, I want to do something like this in a T4 (.tt) file (rookie code):

<# IServiceProvider serviceProvider = (IServiceProvider)this.Host;
   EnvDTE.DTE dte = (EnvDTE.DTE) serviceProvider.GetService(typeof(EnvDTE.DTE));
   EnvDTE80.DTE2 dte2 = (DTE2)dte;
   ServiceProvider serviceProvider2 = new Microsoft.VisualStudio.Shell.ServiceProvider(dte2 as Microsoft.VisualStudio.OLE.Interop.IServiceProvider);
   Microsoft.VisualStudio.SharePoint.ISharePointProjectService projectService = serviceProvider2.GetService(typeof(Microsoft.VisualStudio.SharePoint.ISharePointProjectService)) as Microsoft.VisualStudio.SharePoint.ISharePointProjectService;

When I run this example, the projectService comes back as null.  (The other code returns valid objects.)

Does anyone know if this is possible and, if so, how to do it?

Thanks!  John


Upgrade a VS2010 Isolated shell to VS2013 shell

$
0
0

I am upgrading a VS2010 Isolated Shell application to VS2013 shell. I am getting following errors in the active logs.

1.What does the first error mean? how to fix it?

2. For second error, I saw multiple similar errors associate with different GUID.I searched 4CA58AB2-18FA-4F8D-95D4-32DDF27D184C in registry table, looks like every time when I launch my application, it will overwrite the path of this GUID to pathWhereILaunchApplication\Common7\IDE\PrivateAssemblies*\Microsoft.VisualStudio.TeamFoundation.VersionControlUI.dll, not the Visual Studio installation path, which leads to cannot locate the dll error.

Can someone help me out of here?

 <entry>
    <record>20</record>
    <time>2014/10/03 18:52:41.650</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>Loading UI library</description>
    <guid>{8889E051-B7F9-4781-BB33-2A36A9BDB3A5}</guid>
    <hr>800a006f</hr>
    <errorinfo>Class not registered.
Looking for object with CLSID: {6C4024E7-5DEC-4EEC-B3F9-55B3F3AD1E9E}.</errorinfo>
  </entry>
  <entry>
    <record>21</record>
    <time>2014/10/03 18:52:42.044</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>Loading UI library</description>
    <guid>{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo>Cannot find the requested resource.</errorinfo>
    <path>D:\branchDir\bin\x86\Debug\ManagementStudio\Common7\IDE\PrivateAssemblies*\Microsoft.VisualStudio.TeamFoundation.VersionControlUI.dll</path>
  </entry>

How to subscribe Add Existing Item event for a VS project

$
0
0

Hi,

In our package, we want to handle this scenario - use Add Existing Item dialog to add a file to a project (the project already has a file with same file name). VS will popup below dialog,

Could you tell me how we can subscribe to the event when user click Yes button in above dialog?

Can we install 2012 update 4 in 2013 installed machine ?

$
0
0

Hi Everyone,

Can we install VS 2012 update 4 in a VS2013 installed machine ?

Could you please provide suggestion on this ? If we install like this did we face any issue ?

Regards,

Manoj Babu B. 


Manoj

Programmatically getting current visual studio addin version

$
0
0

Hi I am creating a menu add-in vs ,when i choose the menu the action will be performed like below

If add-in is used from vs2010 it should perform some specific actions

if it is used from vs2012 it should perform different set  of action and so on

What i need is how to  diagrammatically find the version of visual studio from which add-in is accessed?

Thanks


Kani


Team Explorer Visual Studio 2013: External Tools arguments are empty

$
0
0

Hi,

We're using Microsoft Team Explorer for Visual Studio 2013, update 3 has been applied

I'd like to add external commands to the tools menu; every time the external arguments are empty

Simple example is to add "open file location" command:

Command: explorer.exe
Arguments: $(ItemPath)

Every possible argument choice passes empty strings to the external command.  I could not get this to work in Team Explorer VS 2012 or Team Explorer VS 2013 Update 3.

Any suggestions?

Thanks

Open Disassembly Window And Go to a particular address during Debugging

$
0
0

We have a VS 2010 based isolated shell application.  I have a tool window that displays a subset of addresses during debugging (In debugger break state). When user selects a particular address ,  I am trying to open the Disassembly window and navigate to the user selected address.  

Is there any way to open the Disassembly window and navigate to a particular addressduring debugging? Please suggest.

Thanks

Jo


How to hook to toolbox item selection events or How to integrate to F1 for my custom toolbox items

$
0
0

Hi All,

Extention type  : Isolated shell

Visual studio version : Visual studio 2010

My main goal is to be able to provide F1 help for my toolbox item , i reviewed this artical http://social.msdn.microsoft.com/Forums/vstudio/en-US/88554df3-cff1-4605-8b3f-017228b6f77f/toolbox-how-to-add-f1-help-keyword-to-toolbox-items?forum=vsx

but , the issue i am having is that when i press F1 on the toolbox item a help page is opened for the previos page i open (for example help page for ProjectNode). this made me think i need to update and track my selection with ITrackSelection interface. Am i right ?

How do i hook to the toolbox item selection change event ? 

Please advise .

Thanks



Move Project Folder - Access Violation

$
0
0

Hi there,

I want to move a project that is within a solution.

So I remove that project in my package. After it was removed I save the solution file.

Then I move the folder and re-add the project.

This works in 70-80% of the times I try it. But sometimes I get a AccessViolation that I can't move the folder because it is not accessible. 

And I have absolutely no clue why this happens. Everything is saved.

Is there a way to determine how it is blocked? I've used some SysInternals tools and it says that the Visual Studio process is blocking the directory. Can I do something more? I thought saving the solution file and removing the project is all I can do.

Maybe someone can help.

Thanks,
Fabian


The Visual Studio Settings-Switcher! Visit http://visualstudiogallery.msdn.microsoft.com/a79072f7-3109-44a0-95c0-9c50e729d6a3

How to extend the property pages of a project in a Visual Studio Extension (VSIX) development?

$
0
0

I was able to extend the Project Property pages of the project created in my Visual Studio Extension project (VSIX), from here.

However, the property pages I obtained from this was like:

But I'd like to get my property pages in this style:

Can someone help me to achieve this? 

C# help would be nice :)

Using the Extensibility --> VSIX Project with a web application - Error TemplateProjectOutputGroup does not exist

$
0
0

I am using Visual Studio 2010 Premium.  I have created a Web Application that I would like to use as a project template.  I am able to successfully use the Export Template Extension to creat the VSIX file.  However, I have the following issues when trying to do it this way.

  • On File -->  New Project dialog, the template only shows up under Visual Basic and not under Web.
  • I don't want to type in all that information every time I want to create a VSIX.

My solution was to add a VSIX Project (Visual Basic --> Extensibility --> VSIX Project) to my solution that contains the Web Application.  Then add a .vstemplate file to my web project so I can fine tune what I want.

I got as far as adding the VSIX project to my solution and I cannot build the project.  I receive the following error.

Description:  The target "TemplateProjectOutputGroup" does not exist in the project.

File: WebApplication.vbproj (This is my VB project file to my web application).

The error goes away when I remove the VSIX project from the solution.  How can I fix this?


Tray

Enable drag drop support in solution explorer of VS2013

$
0
0

I have created a custom language service using MPF for Projects - Visual Studio 2013.

The drag & drop is disabled when trying to copy or move a file or folder from the Project Explorer.

How can I enable drag drop support in solution explorer?


VS Package Debugging Issue

$
0
0
I just brought two of my add-ins (C#, VS 2010) into a new VS Package project.  It went quite well and the two commands seem to work the same as they did as add-ins.  I didn't have to change the code at all, except for some minor adjustments because of differences in infrastructure between add-ins and VS packages.

I did encounter one interesting problem which makes debugging these add-ins when inside the VS Package environment impossible.

With add-ins, the DTE2 object is provided as part of the add-in architecture.

With VS Packages, one may obtain the DTE2 object as follows:

DTE2 AppObject = (DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.10.0");

This works just fine for the finished VSIX installed extensions.

Unfortunately, however, when attempting to debug a VS Package, the DTE2 object returned is that of the debug instance of visual studio and not that of the test instance.  When debugging add-ins, on the other hand, the provided DTE2 object is, correctly, that of the test instance of visual studio.

While I understand that it is Microsoft's position that VS Packages are preferable to add-ins, it is clear that not being able to debug a VS Package when the DTE2 object is used, is a serious problem and one, I must add, that does not exist with the deprecated add-in architecture.

Charles S. Cotton

Viewing all 4410 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>