Not available the Command line for any Extensions without Add-in - by Denis Kuzmin (reg)

Status : 

  Deferred<br /><br />
		The product team has reviewed this issue and has deferred it for consideration at a later time.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


2
0
Sign in
to vote
ID 1075033 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/3/2015 12:34:51 PM
Access Restriction Public

Description

Currently we'll have a problem with new VS2015 for some features with plugins:
* VSPackage Extensions can't work in command line(for example with > devenv /Build release etc.), right ?
* With Add-in it's possible, However add-ins are deprecated in Visual Studio 2013 (http://msdn.microsoft.com/en-us/library/80493a3w.aspx) and removed in VS2015 Preview as i can see...

as result - no any variants for work with command line... and what to do ?! (FAQ: Converting Add-ins to VSPackage Extensions: http://msdn.microsoft.com/en-us/library/dn246938.aspx)

Actually, general problem only with working in command line for extensions...
VSPackage is better, and my choice also the VSPackage between Add-in - So, can you fix this with ANY alternative for compatibility ?

-------

How it works with add-in (not convenient, but as i said before, no any other variants):
* Create VSPackage Extension with some features for VS.
* Create external lib as 'Bridge' for Add-in (in general, API for accessing and managing)
* Implement accessing in VSPackage
* And finally use the Add-in for wrapping main logic from VSPackage through bridge

For example, this not working if we use >devenv "Project.sln" /Rebuild Release for VSPackage:

_buildEvents.OnBuildBegin += new _dispBuildEvents_OnBuildBeginEventHandler((vsBuildScope Scope, vsBuildAction Action) => {
    Console.Out.WriteLine("OnBuildBegin");
});

or registering caller with the [AdviseUpdateSolutionEvents](http://msdn.microsoft.com/en-us/library/bb141335.aspx)

public class Connect: IDTExtensibility2, IVsSolutionEvents, IVsUpdateSolutionEvents2
{
    private IVsSolution spSolution;
    private uint _pdwCookieSolution;
    ...
    public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
    {
        ...
            spSolution = (IVsSolution)ServiceProvider.GlobalProvider.GetService(typeof(SVsSolution));
            spSolution.AdviseSolutionEvents(this, out _pdwCookieSolution);

            spSolutionBM = (IVsSolutionBuildManager2)ServiceProvider.GlobalProvider.GetService(typeof(SVsSolutionBuildManager));
            spSolutionBM.AdviseUpdateSolutionEvents(this, out _pdwCookieSolutionBM);
        ...
    }
}

but for the Add-ins it's all working,

With Visual Studio 2015 we lose this opportunity.
need ANY variant for using extension in command line
Sign in to post a comment.
Posted by Denis Kuzmin (reg) on 3/8/2015 at 8:12 AM
For samples, I add real examples for more details for this problem:

* https://bitbucket.org/3F/vssolutionbuildevent/wiki/CI/Devenv%20Command-Line
This example of how to support the command-line mode for work with any plugin(VSPackages) through Devenv(Visual Studio), for example:

    "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" "D:\tmp\App1\App1.sln" verbosity:diagnostic /Build Release

But, It's not possible for VS2015

However yes, we can also work through msbuild.exe (Microsoft Build Tools) it's equivalent for our plugin at least:
* https://bitbucket.org/3F/vssolutionbuildevent/wiki/CI/CI.MSBuild

___
This means, that not planned any support the Command line for VSPackages instead of lost opportunities in Visual Studio 2015 ?

or maybe already added new features for VSPackages ? where to look ?

hmm., maybe it's not critical for all... well... time will tell
Posted by Microsoft on 1/3/2015 at 12:46 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/ph/1117.