Click here to Skip to main content
15,891,704 members
Articles / Containers / Virtual Machine

A simple Switch Framework for the Visual Studio prompt and the devenv command

Rate me:
Please Sign up or sign in to vote.
4.78/5 (11 votes)
20 Apr 2007CPOL3 min read 53.1K   313   13  
A library for creating custom switches for the devenv command prompt (extensibility example).
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Company.SimpleSwitchFramework</RootNamespace>
    <AssemblyName>SimpleSwitchFramework</AssemblyName>
    <SignAssembly>true</SignAssembly>
    <AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
    <ProjectGuid>{85C4FBA6-4EC8-4EAA-8BC4-A0CB022F184D}</ProjectGuid>
  </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>
    <DocumentationFile>bin\Debug\SimpleSwitchFramework.XML</DocumentationFile>
  </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>
    <Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <Reference Include="EnvDTE80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <Reference Include="Microsoft.VisualStudio.OLE.Interop" />
    <Reference Include="Microsoft.VisualStudio.Shell.Interop" />
    <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0" />
    <Reference Include="Microsoft.VisualStudio.TextManager.Interop" />
    <Reference Include="Microsoft.VisualStudio.Shell" />
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Design" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Guids.cs" />
    <Compile Include="Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="SwitchFramework\Configuration\CommandSwitch.cs" />
    <Compile Include="SwitchFramework\Configuration\Configuration.cs" />
    <Compile Include="SwitchFramework\Configuration\StaticConfiguration.cs" />
    <Compile Include="SwitchFramework\Configuration\XmlConfiguration.cs" />
    <Compile Include="SwitchFramework\CustomSwitch.cs" />
    <Compile Include="SwitchFramework\CustomSwitchEngine.cs" />
    <Compile Include="SwitchFramework\ISwitchPackage.cs" />
    <Compile Include="SwitchFramework\SwitchCreator.cs" />
    <Compile Include="SwitchFramework\Switches\AboutSwitch.cs" />
    <Compile Include="SwitchFramework\Switches\OpenWebSiteSwitch.cs" />
    <Compile Include="SwitchFramework\Switches\SpecialCaseSwitch.cs" />
    <Compile Include="SwitchFramework\SwitchException.cs" />
    <Compile Include="SwitchFramework\SwitchOptionsParser.cs" />
    <Compile Include="VsPkg.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="VSPackage.resx">
      <MergeWithCTO>true</MergeWithCTO>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <Content Include="Resources\Package.ico" />
    <Content Include="SwitchFramework\switches.xml" />
  </ItemGroup>
  <PropertyGroup>
    <TargetRegistryRoot>Software\Microsoft\VisualStudio\8.0Exp</TargetRegistryRoot>
    <RegisterOutputPackage>true</RegisterOutputPackage>
    <RegisterWithCodebase>true</RegisterWithCodebase>
  </PropertyGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="C:\Program Files\Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Tools\Build\Microsoft.VsSDK.targets" />
  <!-- 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>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Italy Italy
I am a biomedical engineer. I work in Genoa as software developer. I developed MFC ActiveX controls for industrial automation for 2 years and packages for Visual Studio 2005 for 1 year. Currently I'm working in .NET 3.5 in biomedical area.

Comments and Discussions