Skip to content

Commit

Permalink
Added package project
Browse files Browse the repository at this point in the history
  • Loading branch information
madskristensen committed Jan 6, 2017
1 parent 1f2267b commit 9f2946b
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 19 deletions.
6 changes: 6 additions & 0 deletions OpenCommandLine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Package", "src\Package\Package.csproj", "{173BEF3F-02C4-49DF-A4F1-5562112B1EDA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{ADE3EF15-69C4-48AC-ABE1-9C645C992558}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADE3EF15-69C4-48AC-ABE1-9C645C992558}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADE3EF15-69C4-48AC-ABE1-9C645C992558}.Release|Any CPU.Build.0 = Release|Any CPU
{173BEF3F-02C4-49DF-A4F1-5562112B1EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{173BEF3F-02C4-49DF-A4F1-5562112B1EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{173BEF3F-02C4-49DF-A4F1-5562112B1EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{173BEF3F-02C4-49DF-A4F1-5562112B1EDA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 2 additions & 2 deletions src/OpenCommandLine/OpenCommandLinePackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void BeforeExeQuery(object sender, EventArgs e)
return;

string[] allowed = { ".CMD", ".BAT" };
string ext = Path.GetExtension(path).ToUpperInvariant();
bool isEnabled = allowed.Contains(ext) && File.Exists(path);
string ext = Path.GetExtension(path);
bool isEnabled = allowed.Contains(ext, StringComparer.OrdinalIgnoreCase) && File.Exists(path);

button.Enabled = button.Visible = isEnabled;
}
Expand Down
35 changes: 18 additions & 17 deletions src/OpenCommandLine/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="f4ab1e64-5d35-4f06-bad9-bf414f4b3bbb" Version="2.1" Language="en-US" Publisher="Mads Kristensen" />
<DisplayName>Open Command Line</DisplayName>
<Description xml:space="preserve">Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.</Description>
<License>Resources\LICENSE</License>
<Icon>Resources\icon.png</Icon>
<PreviewImage>Resources\preview.png</PreviewImage>
<Tags>Solution Explorer, cmd, powershell, bash, post-git, cmder, prompt, console, conemu</Tags>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="12.0" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="14.0" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="15.0" />
</Installation>
<Metadata>
<Identity Id="f4ab1e64-5d35-4f06-bad9-bf414f4b3bbb" Version="2.1" Language="en-US" Publisher="Mads Kristensen" />
<DisplayName>Open Command Line</DisplayName>
<Description xml:space="preserve">Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.</Description>
<MoreInfo>https://github.com/madskristensen/OpenCommandLine</MoreInfo>
<License>Resources\LICENSE</License>
<Icon>Resources\icon.png</Icon>
<PreviewImage>Resources\preview.png</PreviewImage>
<Tags>Solution Explorer, cmd, powershell, bash, post-git, cmder, prompt, console, conemu</Tags>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="12.0" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="14.0" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="15.0" />
</Installation>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
</PackageManifest>
82 changes: 82 additions & 0 deletions src/Package/Package.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{173BEF3F-02C4-49DF-A4F1-5562112B1EDA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Package</RootNamespace>
<AssemblyName>Package</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Content Include="..\..\LICENSE">
<Link>Resources\LICENSE</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenCommandLine\OpenCommandLine.csproj">
<Project>{ADE3EF15-69C4-48AC-ABE1-9C645C992558}</Project>
<Name>OpenCommandLine</Name>
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgdefProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\OpenCommandLine\Resources\icon.png">
<Link>Resources\icon.png</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="..\OpenCommandLine\Resources\preview.png">
<Link>Resources\preview.png</Link>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
22 changes: 22 additions & 0 deletions src/Package/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="f4ab1e64-5d35-4f06-bad9-bf414f4b3bbb" Version="2.1" Language="en-US" Publisher="Mads Kristensen" />
<DisplayName>Open Command Line</DisplayName>
<Description xml:space="preserve">Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.</Description>
<MoreInfo>https://github.com/madskristensen/OpenCommandLine</MoreInfo>
<License>Resources\LICENSE</License>
<Icon>Resources\icon.png</Icon>
<PreviewImage>Resources\preview.png</PreviewImage>
<Tags>Solution Explorer, cmd, powershell, bash, post-git, cmder, prompt, console, conemu</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0]" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="OpenCommandLine" Path="|OpenCommandLine;PkgdefProjectOutputGroup|" />
</Assets>
</PackageManifest>

0 comments on commit 9f2946b

Please sign in to comment.