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

VS 2015 shell edition and VS 2017 Ent edition

$
0
0

Hi All,

- Install VS 2015 shell edition-Integrated (free version to develop SSIS packages for data load/ETL)

- Install VS 2017 Enterprise edition-Isolated (user specific license for performance test)

Will it create any conflicts if we install above two versions on same machine? We have only one user to use VS 2017 Ent edition and we have multiple users to use VS 2015 shell edition. The above plan suggested our team to reduce the license cost...




VS Code + PHP, how to go to definition

$
0
0

, do I need other extensions?

THX!

Team Member Repo Empty

$
0
0
I added one my team members to a project, but he cannot see the repository. He can see only the project folder. Others can see the repository. Please help me to over come from this problem.

A value for 'VsixPackage' needs to be specified in the catalog.

$
0
0

Hey,

when trying to install a VSIX package, I get this:

07/08/2019 13:10:59 - Beginning to install extension to Visual Studio Enterprise 2019 Preview... 07/08/2019 13:11:02 - Install Error : System.InvalidOperationException: A value for 'VsixPackage' needs to be specified in the catalog. at Microsoft.VisualStudio.ExtensionManager.PackageInstaller.Validate(ZipPackage packageContainer, IEngineHost engineHost) at Microsoft.VisualStudio.ExtensionManager.DefaultPackageInstaller.Validate(ZipPackage packageContainer, IEngineHost engineHost) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion) at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)

The VSIX is generated during build and based on VS 2017 templates. Does anyone know what this error means or if there is an easy fix?

Thanks!

Cannot localize VSIX Menu Command

$
0
0
Hello, I'm trying to create a small and useful visual studio extension, using visx project.
(My Visual Studio Version is 2019 Enterprise 2019 Preview Version 16.2.0 Preview 1.0 and Visual Studio Professional 2017 Version 15.9.12)
What I really suffer from is that I cannot localize the menu text of this vsix package.
The guidance which I referred to and followed was the MSDocument site, below.
--------
Prerequisites
--------
To focus the problem, I made a very simple Vsix project named "VsixLocalizeTrial", 
and added a CustomCommand named "TestCommand01" which shows Information alert message
when the menu is clicked. (I localized the first line of message, using .resx file, and it works fine.)

I'm trying to localize just the button text of this MenuItem.

To do so, I copied the "VsixLocalizeTrialPackage.vsct" file and pasted it to it's English, Spanish, Japanese corresponding vsct files (VsixLocalizeTrialPackage.en-US.vsct, VsixLocalizeTrialPackage.es-ES.vsct, VsixLocalizeTrialPackage.ja-JP.vsct) . I changed the button text of TestCommand01Id to the native expression for their corresponding language.

Then I closed the project in Visual Studio, opned the csproj file by other editor, and adjusted the VSCTCompile element, add a ResourceName element that points to Menus.ctmenu, as follows.
<ItemGroup>  <VSCTCompile Include="VsixLocalizeTrialPackage.vsct">    <ResourceName>Menus.ctmenu</ResourceName>  </VSCTCompile>  <VSCTCompile Include="VsixLocalizeTrialPackage.en-US.vsct">    <ResourceName>Menus.ctmenu</ResourceName>  </VSCTCompile>  <VSCTCompile Include="VsixLocalizeTrialPackage.es-ES.vsct">    <ResourceName>Menus.ctmenu</ResourceName>  </VSCTCompile>  <VSCTCompile Include="VsixLocalizeTrialPackage.ja-JP.vsct">    <ResourceName>Menus.ctmenu</ResourceName>  </VSCTCompile></ItemGroup>

What I expect is that I can see localized "Invoke TestCommand01" command menu
just below the "Tool" menu, in the experimental Visual Studio instance,
when Debbug begins.

--------
Symptoms
--------

I can see "Invoke TestCommand01"menu which is not localized.
So, in accordance with the advice in the MSDocs, I've added the entry at the bottom of the AssemblyInfo fie of the vsix as follows.
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
→[assembly: NeutralResourcesLanguage("es-ES", UltimateResourceFallbackLocation.Satellite)]
→[assembly: NeutralResourcesLanguage("ja-JP", UltimateResourceFallbackLocation.Satellite)]

I tried it to set the packages default language.

When I set this, to my surprise, menu "Invoke TestCommand01" did not appears at all.

--------
What I'd like to know
--------

I'm wondering if I can really localize vsix custom menucommand in with this process.
I'm afraid I miss some very important procedure.

I have uploaded above simple program to the github.
https://github.com/TrailRunner-MF/Experimental

It's a very simple program just focus on the localization of vsct files.

I'll appreciate any advice or hint or example relating to this complicated problem.

Thank you.



Determine which Intellisense mode is turned on.

$
0
0

Hey,

i write an intellisense presenter extension for c# and i need to know if the suggestion mode or the auto complete mode is turned on.

I hope someone can help me with this.

Cheers,

Martin

XML schema or msbuild targets in VSIX v3

$
0
0

Hello,

I found these old questions Installing XML schemas files (*.xsd) with VSIX and When will VSIX packages support deploying MSBuild extensions? asking for the same in 2010, but if I understand correctly the documentation, in VSIX v3, it should be possible to install files outside of the extensions folder.

However, the documentation only deals with ProjectReferences. How do I add an individual .xsd file asset and specify it should go to [INSTALLDIR]\Xml\Schemas in the vsixmanifest?

Thanks,
Jan

GitFlow extension on VS 2019 16.3 Preview 2.0

$
0
0

I had GitFlow extension installed on VS2019 16.2.2.
Installed VS2019 16.3 Preview 2 to play around with newer functionalities and newest Core 3, but cannot find GitFlow extension on this installation.
Even if I go to Manage Extensions and installs it, nothing happens (it states that installation will happen at close all windows, but nothing).

Is this expected due to the preview?


Why does IDebugProperty2::EnumChildren() pass a non-writable ref Guid arg?

$
0
0

Hi folks,

I'm not sure if the forum is the right place to post this issue but here goes.

It appears that Visual Studio 2015 passes a memory protected ref Guid argument in to the IDebugProperty2::EnumChildren() method.  This presents itself as an AccessViolationException if I merely try to write to the guidFilter argument.

This may not seem like a big deal because there doesn't seem to be any reason that an IDebugProperty2 implementation would want to write to this argument but it is causing me BIG headaches because we are using an Aspect Oriented Framework that has to be general, thus it always writes back any ref arguments.

Minimum repro:

int EnumChildren ( 
   enum_DEBUGPROP_INFO_FLAGS   dwFields,
   uint                        dwRadix,
   ref Guid                    guidFilter,
   uint                        dwAttribFilter,
   string                      pszNameFilter,
   uint                        dwTimeout,
   out IEnumDebugPropertyInfo2 ppEnum
)
{
  // This results in an AccessViolationException.
  guidFilter = Guid.NewGuid();
}

I haven't had a chance to see if this is a problem in later version of Visual Studio but I'm assuming it is.

Can someone please:

  • advise if this is the forum is the right spot to raise such an issue?
  • advise if/when this bug may be fixed?

Thanks,

Ben

How to create VSIX Project for Custom Scaffolding item for ASP.NET Core Web application

$
0
0
I want to create a new custom scaffolding item for ASP.NET CORE web application. I unable to create VSIX project for this so please someone help me how to create VSIX project for custom scaffolding item for ASP.NET Core web application.

Custom DebugEngine - How can I refresh Watch Window when reloading .natvis files?

$
0
0

Hi folks,

I'm working on a custom DebugEngine and we've written our own natvis engine to consume .natvis files.  It's unclear to me how I might cause the Watch Window, Locals, Autos, etc. to refresh if the user re-loads the .natvis files.

It would also be nice if there were an easy mechanism to know when to reload the .natvis files.

Native behavior appears to reload and refresh the DebugProperty views whenever a user saves a .natvis file within the IDE.

Can someone point me in the right direction or advise if there isn't such a mechanism?

Thanks,

Ben

[Android dev] Is it possible to build an native application (NDK, native activity) containing ARM and ARM64 versions of .so in one APK?

$
0
0

Hello.

I use Visual Studio to develop Android apps. From August 1, according to Google requirements, 64-bit native libraries should be included in the APK. In Visual Studio, i can build APK-s for ARM and ARM64 separately. Is it possible to build an native application (NDK, native activity) containing ARM and ARM64 versions of .so in one APK?

p.s. I apologize if I wrote in wrong section of the forum.



how to write #define in VSCT file

$
0
0
I m trying to do VS SDK upgrade from 2005 to 2019 and in previous version we used .ctc files. I have used ConvertCTCtoVSCT.pl script to convert the ctc files to vsct. The .ctc files contain " #define _CTC_GUIDS_ " which is getting converted into a comment in vsct file. Is there a way to use this #define in vsct file.

VSIX setting InstalledProducts

$
0
0

Hello,

for backward compatibility reasons, I need my VSIX to create a key under VS's private copy of \Software\Microsoft\VisualStudio\16.0_2d196999_Config\InstalledProducts\.

What does VSIX need to contain or define in order to create a key under InstalledProducts?

Thank you,
Jan

Ajax ModalPopupExtender fails to get Z-order right when nesting calls

$
0
0

The scenario I am trying to support is that of a base web form which displays data.  However, that form has the ability to support minor edits.  In this case we are using a basic button to invoke a modal dialogue (Ajax ModalDialogExtender) with the user, in which those edits will be performed.  To support this various validations are required.  The way I support the display of validation messages is the Ajax ModalDialogExtender.  Therefore the result of this is the need to nest calls to this feature. This seems to work fine when calls to ModalDialogExtender are client side invoked, but the problems start when you need server side support to assist with the validations.

This question includes a full VS 2017 project.  It is very minimal and attempts to demonstrate the issue rather than be to pretty! The project references AjaxControlToolkit.15.1.4.0.

The project is mainly HTML with embedded JS and CSS Style.  There is a very small amount of code behind in VB.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ModalFromModal.aspx.vb" Inherits="ModalFromModal.frmMain" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>Modal from modal</title><script type="text/javascript">
        function ShowDialog() {
            $find("frmDialog").show();
            var hfld = document.getElementById("bHfdDialogActive");
            hfld.value = 1;
            return false;
        }
        function HideDialog() {
            $find("frmDialog").hide();
            var hfld = document.getElementById("bHfdDialogActive");
            hfld.value = 0;
            return false;
        }
        function ShowMsg() {
            $find("frmMsg").show();
            return false;
        }
        function CheckMyData() {
            var htxtMyWord = document.getElementById("txtMyWord");
            var pos = htxtMyWord.value.search(" ");
            if (pos != -1) {
                var hWarning = document.getElementById("lblWarning");
                hWarning.innerText = "Spaces are not allowed";
                $find("frmMsg").show();
                return false;
            }
            return true;
        }</script><style>
        .mpxMsg {
            z-index:1001;
        }
        .mpxDialog {
            z-index:1000;
        }
        .errmsg {
            text-align: center;
        }
        .errpnl {
            width: 400px;
        }
        .pnlDialog {
            width: 600px;
            height:200px;
        }</style></head><body><form id="frmMain" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><div><h1>Modal from modal - Base form</h1><asp:Button ID="Button1" runat="server" Text="Edit data"  OnClientClick="return ShowDialog();" /></div><asp:HiddenField ID="hfdForModel" runat="server" /><asp:ModalPopupExtender
            ID="frmMsg"
            TargetControlID="hfdForModel"
            runat="server"
            BackgroundCssClass="mpxMsg"
            DropShadow="true"
            PopupControlID="pnlIssues"  ></asp:ModalPopupExtender>          <asp:Panel ID="pnlIssues" runat="server" BorderColor="Black" BorderStyle="Outset"  BorderWidth="2" BackColor="White" style="display:none" CssClass="errpnl" ><div class="errmsg"><asp:Label ID="lblHdr" runat="server" text="Information" style="font-weight: bold;"/><br /><br /><asp:Label ID="lblWarning" runat="server" > </asp:Label><br /><button type="button" onclick="$find('frmMsg').hide();" class="msgbutton">OK</button></div></asp:Panel><asp:HiddenField ID="bHfdDialogActive" runat="server" /><asp:HiddenField ID="hfDialogTarg" runat="server" /><asp:ModalPopupExtender
            ID="frmDialog"
            TargetControlID="hfDialogTarg"
            runat="server"
            BackgroundCssClass="mpxDialog"
            DropShadow="true"
            PopupControlID="pnlDialog"  ></asp:ModalPopupExtender><asp:Panel ID="pnlDialog" runat="server" BorderColor="Black" BorderStyle="Outset"  BorderWidth="2" BackColor="White" style="display:none" CssClass="pnlDialog" ><h2>Dialogue - edit</h2><asp:Label ID="lblMyWord" runat="server" Text="My word"></asp:Label><asp:TextBox ID="txtMyWord" runat="server"></asp:TextBox><asp:Button ID="cmdCheck" runat="server" Text="Check" OnClientClick="return CheckMyData();" /><br /><br /><asp:Button ID="cmdClose" runat="server" Text="Close" OnClientClick="HideDialog();" /></asp:Panel></form></body></html>

Public Class frmMain
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If IsPostBack Then
            If bHfdDialogActive.Value = "1" Then frmDialog.Show()
            If Not WordInDatabase() Then
                lblWarning.Text = "Your word is not on file"
                frmMsg.Show()
            End If
        End If
    End Sub
    Function WordInDatabase() As Boolean
        Return False
    End Function
End Class

The HTML covers the base form, a declaration of a frmDialog which is launched from the base form button (edit).  There is also a declaration of frmMsg, used to report a validation error to the user.

The edit form has a textbox a check button and a close button.  The idea is that when the check button is pressed, validation is in two stages: 

First, client side, there is a check to make sure only a single word is entered.  The purpose of this is to illustrate how I want it to work.  i.e. That the base form is in background, the edit form overlays that and finally the validation message overlays that. 

Second stage of validation is the perform a lookup on a database to see if that word exists.  I have not bothered to include the code behind for that, other than a shell function which always returns a false to invoke the same frmMsg from server side. 

The problem: Unfortunately, the result of this is that whilst both the frmDialog and frmMsg are issued, the frmDialog overlays the frmMsg.  If you use the frmDialog close button, you can see the frmMsg.

I have seen other articles where the use of a styled z-order which seems to be relevant.  You will see I have implemented this, but it seems to have no benefit.  Other articles also refer to JS basedToTop feature, but I could never find enough details to understand how to try this out.

You will see that I force the re-display of the frmDialog for each postback, based on a hidden field.  There might be a more elegant way of doing this?  I did experiment with calling that from LoadComplete but that made no difference.



Visual studio 2019 package menu

$
0
0

Dear experts,

I have a Visual studio package targeting VS2015 and up. The package has a menu that is supposed to show on the top level. The topmost menu item is declared in VSCT file like this:

<Menu guid="guidPackageCmdSet" id="MainMenu" priority="700"><Parent guid="guidSHLMainMenu" id="IDG_VS_MM_TOOLSADDINS" /><Strings><ButtonText>&amp;Main Menu</ButtonText></Strings></Menu>

As you can see, the parent item has guid guidSHLMainMenu and id IDG_VS_MM_TOOLSADDINS.

In VS2015 and VS2017 this menu item appears in the top level menu before "Tools". But in VS2019 this menu shows up as the "Extensions" submenu. I have two questions:

1. Why identically defined menu items show up in different locations in VS 2017 and VS2019?

2. Is there any way to make an extension menu part of the VS top level menu?

Best regards,

Victor.

Custom Property Arrays In Properties Window

$
0
0
I made a custom Color[] in the Properties window for a TabControl I'm making, but is there any way to change the text that displays in the Properties window from [0], [1], etc? 


\/\/\Syko/\/\/

AnkSVN within VS2015 Shell doesn't work

$
0
0

It works with TcXaeShell VS 2013 Shell but 2015 Shell doesn't allow Anksvn or VisualSVN to be installed.

Only if we install the full Visual Studio Version.

Why??? We need this to work in VS2015 cause we are using a SVN Repository.

Regards, Jochen

Include existing folder path as project item

$
0
0

Hi,

I'm trying to add files to projects organizing them in folders before adding. The scenarios:

1. Before adding the file check if the folder exists as a project item. If so, the project item is used to add the file.

2. Otherwise check if the folder path exists. If so, include folder path as project item and use to add the file.

3. Otherwise the folder is unknown. Add the folder as project item and use to add the file.

Scenario 1 and 3 work, but I can't get scenario 2 to work. The code:

var service = package.GetService<SDTE, EnvDTE80.DTE2>(); foreach (Project project in service.Solution.Projects) { var folder = project.AddFolderIfNotExists("Folder"); var file = folder.ProjectItems.AddFromFileCopy(@"c:\temp\somefile.cs"); }

public static class ProjectItemsExtensions
{
    public static Guid ProjectItemKindFolder = new Guid("{6BB5F8EF-4483-11D3-8BCF-00C04F8EC28C}");
    public static ProjectItem GetFolder(this Project project, string folderName)
    {
        ThreadHelper.ThrowIfNotOnUIThread();
        foreach (ProjectItem item in project.ProjectItems)
        {
            var kind = new Guid(item.Kind);
            if (kind != ProjectItemKindFolder) continue;
            if (item.Name.ToLowerInvariant().Equals(folderName.ToLowerInvariant())) return item;
        }
        return null;
    }
    public static ProjectItem AddFolderIfNotExists(this Project project, string folderName)
    {
        //*****
        ThreadHelper.ThrowIfNotOnUIThread();
        //***** Determine if folder is included in the project;
        var folder = GetFolder(project, folderName);
        if (folder != null) return folder;
        //***** Determine if the folder path exists. If so include in the project;
        var projectPath = Path.GetDirectoryName(project.FileName);
        var folderPath = Path.Combine(projectPath, folderName);
        if (Directory.Exists(folderPath)) return project.ProjectItems.AddFolder(folderPath);
        //***** Else add folder;
        folder = project.ProjectItems.AddFolder(folderName);
        return folder;
    }
}

The AddFolder methods throws an exception that the folder already exists.

When adding the file I need the folder first as project item to add it in context. No luck with the AddFile* methods as well.

Any ideas on how I can include the folder in the project?

Cheers,

Peter

Problem calling COM DLL from Excel 2016

$
0
0

Hi, I have a COM DLL which I developed in Visual Studio. It works perfectly in Excel 2010 but when I do the identical call from Excel 2016 I get an error “Class not registered”. Both versions of Excel are installed on the same computer. I’m at a complete loss at why it will work in one version of Excel but not in the other. I tried reinstalling Office, registering (RegAsm) my dll but no luck.

Any help would be greatly appreciated.
Viewing all 4410 articles
Browse latest View live


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