Click here to Skip to main content
15,896,201 members
Articles / Desktop Programming / Windows Forms

Windows Forms Modular App Using MEF

Rate me:
Please Sign up or sign in to vote.
4.93/5 (34 votes)
12 Nov 2014CPOL7 min read 101.2K   6.4K   106  
Creating a modular Windows Forms app using MEF.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{C8F67680-0B61-4A18-8190-EF99CC0B6B1B}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ModularWinApp.Modules.Orders</RootNamespace>
    <AssemblyName>ModularWinApp.Modules.Orders</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </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>
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.Composition.Codeplex">
      <HintPath>..\ModularWinApp.Core\bin\Debug\System.ComponentModel.Composition.Codeplex.dll</HintPath>
    </Reference>
    <Reference Include="System.ComponentModel.Composition.Registration">
      <HintPath>..\ModularWinApp.Core\bin\Debug\System.ComponentModel.Composition.Registration.dll</HintPath>
    </Reference>
    <Reference Include="System.Core" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Reflection.Context">
      <HintPath>..\ModularWinApp.Core\bin\Debug\System.Reflection.Context.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="frmAddOrderDetail.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="frmAddOrderDetail.Designer.cs">
      <DependentUpon>frmAddOrderDetail.cs</DependentUpon>
    </Compile>
    <Compile Include="OrdersCommandFacade.cs" />
    <Compile Include="OrdersMenu.cs" />
    <Compile Include="OrdersModule.cs" />
    <Compile Include="OrdersService.cs" />
    <Compile Include="frmOrder.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="frmOrder.Designer.cs">
      <DependentUpon>frmOrder.cs</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\ModularWinApp.Core\ModularWinApp.Core.csproj">
      <Project>{35E1C540-0CB3-4E53-A1B2-A24CCD2CD9D8}</Project>
      <Name>ModularWinApp.Core</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="frmAddOrderDetail.resx">
      <DependentUpon>frmAddOrderDetail.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="frmOrder.resx">
      <DependentUpon>frmOrder.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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
Team Leader ActionPoint
Ireland Ireland
I'm Brazilian currently living in in Limerick, Ireland. I've been working with software development since 1996.

Comments and Discussions