Skip to content

Commit

Permalink
First version of this VSPackage generalized for the common use.
Browse files Browse the repository at this point in the history
  • Loading branch information
konste committed Jan 21, 2016
1 parent ad93be8 commit 171f775
Show file tree
Hide file tree
Showing 14 changed files with 1,194 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
22 changes: 22 additions & 0 deletions CommonSolutionTargets/CommonSolutionTargets.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonSolutionTargets", "CommonSolutionTargets\CommonSolutionTargets.csproj", "{8FFB054D-F81F-4D2A-B32F-29586E12726D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8FFB054D-F81F-4D2A-B32F-29586E12726D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FFB054D-F81F-4D2A-B32F-29586E12726D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FFB054D-F81F-4D2A-B32F-29586E12726D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FFB054D-F81F-4D2A-B32F-29586E12726D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
123 changes: 123 additions & 0 deletions CommonSolutionTargets/CommonSolutionTargets/BuildType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/*
* Copyright (c) 2013-2014 Denis Kuzmin (reg) <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using Microsoft.VisualStudio;

namespace CommonSolutionTargets
{
/// <summary>
/// Represents available types of the build for any actions
///
/// *!* be careful with intersection
/// Scope of:
/// * {5EFC7975-14BC-11CF-9B2B-00AA00573819}
/// * {1496A755-94DE-11D0-8C3F-00C04FC2AAE2}
/// </summary>
public enum BuildType
{
/// <summary>
/// 'build' action
/// </summary>
Build = VSConstants.VSStd97CmdID.BuildSln,
/// <summary>
/// 'rebuild' action
/// </summary>
Rebuild = VSConstants.VSStd97CmdID.RebuildSln,
/// <summary>
/// 'clean' action
/// </summary>
Clean = VSConstants.VSStd97CmdID.CleanSln,
/// <summary>
/// 'deploy' action
/// </summary>
Deploy = VSConstants.VSStd97CmdID.DeploySln,
/// <summary>
/// 'Start Debugging' action
/// </summary>
Start = VSConstants.VSStd97CmdID.Start,
/// <summary>
/// 'Start Without Debugging' action
/// </summary>
StartNoDebug = VSConstants.VSStd97CmdID.StartNoDebug,

/// <summary>
/// 'build' action for selection
/// </summary>
BuildSelection = VSConstants.VSStd97CmdID.BuildSel,
/// <summary>
/// 'rebuild' action for selection
/// </summary>
RebuildSelection = VSConstants.VSStd97CmdID.RebuildSel,
/// <summary>
/// 'clean' action for selection
/// </summary>
CleanSelection = VSConstants.VSStd97CmdID.CleanSel,
/// <summary>
/// 'deploy' action for selection
/// </summary>
DeploySelection = VSConstants.VSStd97CmdID.DeploySel,

/// <summary>
/// 'build' action for project
/// </summary>
BuildOnlyProject = VSConstants.VSStd2KCmdID.BuildOnlyProject,
/// <summary>
/// 'rebuild' action for project
/// </summary>
RebuildOnlyProject = VSConstants.VSStd2KCmdID.RebuildOnlyProject,
/// <summary>
/// 'clean' action for project
/// </summary>
CleanOnlyProject = VSConstants.VSStd2KCmdID.CleanOnlyProject,

/// <summary>
/// 'build' action for project
/// </summary>
BuildCtx = VSConstants.VSStd97CmdID.BuildCtx,
/// <summary>
/// 'rebuild' action for project
/// </summary>
RebuildCtx = VSConstants.VSStd97CmdID.RebuildCtx,
/// <summary>
/// 'clean' action for project
/// </summary>
CleanCtx = VSConstants.VSStd97CmdID.CleanCtx,
/// <summary>
/// 'deploy' action for project
/// </summary>
DeployCtx = VSConstants.VSStd97CmdID.DeployCtx,

/// <summary>
/// 'Compile' action
/// </summary>
Compile = VSConstants.VSStd2KCmdID.COMPILE,
/// <summary>
/// 'Link only' action
/// </summary>
LinkOnly = VSConstants.VSStd2KCmdID.LINKONLY,
/// <summary>
/// 'Publish' action for selection
/// </summary>
PublishSelection = VSConstants.VSStd2KCmdID.ECMD_PUBLISHSELECTION,

/// <summary>
/// Common context
/// </summary>
Common = Int32.MaxValue
}
}
Loading

0 comments on commit 171f775

Please sign in to comment.