Some years ago we made a Visual Studio Add-in, which uses the build events as trigger for the action.
The Add-in was working in the IDE and the Command Line mode.
To load the Add-in for command-line builds, you had to set the
<CommandLineSafe>1</CommandLineSafe>
option.
The migrated extension works in the IDE mode, but the extension is not loaded during command-line builds. How is the configuration to load the extension for command-line builds?
The package has the following class:
[PackageRegistration(UseManagedResourcesOnly = true)]
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About
[Guid(TestPackage.PackageGuidString)]
[ProvideAutoLoad(UIContextGuids.EmptySolution)]
[ProvideAutoLoad(UIContextGuids.NoSolution)]
[ProvideAutoLoad(UIContextGuids.SolutionExists)]
[ProvideAutoLoad(UIContextGuids.SolutionBuilding)]
[ProvideAutoLoad(UIContextGuids.SolutionHasMultipleProjects)]
[ProvideAutoLoad(UIContextGuids.SolutionHasSingleProject)]
[ProvideAutoLoad(UIContextGuids80.SolutionExistsAndNotBuildingAndNotDebugging)]
public sealed class TestPackage : Package
{
...
}If I start the command line build, the package is not initialized:
%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /rebuild "Debug|Any CPU" "Solution.sln"
What is wrong?