다음을 통해 공유


작업 1: 사용자 지정 활동 프로젝트 파일 만들기

이 작업에서는 이 자습서의 나머지 부분 전반에서 사용되는 프로젝트 파일을 만듭니다. 프로젝트 파일에는 대부분의 Windows Workflow Foundation 응용 프로그램에 필요한 어셈블리 참조가 포함되어 있습니다.

C#을 사용하는 경우 프로젝트 파일에 .csproj 파일 이름 확장명을 지정하고 Visual Basic을 사용하는 경우에는 .vbproj 파일 이름 확장명을 지정합니다. 자습서를 진행하는 동안 이 파일을 편집하여 새 프로젝트 파일을 추가하게 됩니다.

이 작업에는 Visual Studio나 독립 실행형 SDK와 함께 텍스트 편집기를 사용하여 파일을 만드는 절차가 포함되어 있습니다.

Visual Studio에서 CustomActivity 프로젝트를 만들려면

  1. Visual Studio에서 파일을 클릭하고 새로 만들기프로젝트를 차례로 가리킵니다. C# 프로젝트를 만들려면 Visual C#, WindowsWindows 응용 프로그램을 차례로 선택하고 프로젝트의 이름을 CustomActivity로 지정한 다음 확인을 클릭합니다. Visual Basic 프로젝트를 만들려면 Visual BasicWindows를 차례로 선택하고 프로젝트의 이름을 CustomActivity로 지정한 다음 확인을 클릭합니다.

  2. 솔루션 탐색기에서 참조를 마우스 오른쪽 단추로 클릭하고 참조 추가를 클릭합니다. .NET 탭에서 다음을 각각 클릭하고 확인을 클릭하여 프로젝트에 추가합니다.

    • System.Configuration

    • System.Workflow.Activities

    • System.Workflow.ComponentModel

    • System.Workflow.Runtime

    • System.Design

    • System.Drawing.Design

    • System.Transactions

    • System.Web

    • System.Web.Services

CustomActivity 프로젝트 파일을 만들려면

  1. 프로젝트 디렉터리에서 CustomActivity라는 새 파일을 만듭니다.

    C# 프로젝트에는 .csproj 확장명을 사용하고 Visual Basic 프로젝트에는 .vbproj 확장명을 사용합니다.

  2. 다음 코드를 복사하여 프로젝트 파일에 붙여 넣습니다.

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" xmlns="https://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>
        <ProjectGuid>{CC3CD618-6C96-472C-A6AD-560931A75337}</ProjectGuid>
        <ProjectTypeGuids>{D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
        <OutputType>WinExe</OutputType>
        <StartupObject>
        </StartupObject>
        <RootNamespace>WebTearWorkflow</RootNamespace>
        <AssemblyName>WebTearWorkflow</AssemblyName>
        <MyType>WindowsFormsWithCustomSubMain</MyType>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <DefineDebug>true</DefineDebug>
        <DefineTrace>true</DefineTrace>
        <IncrementalBuild>true</IncrementalBuild>
        <OutputPath>bin\</OutputPath>
        <DefineConstants>_MyType="Windows"</DefineConstants>
        <DocumentationFile>CustomActivity.xml</DocumentationFile>
        <UseVSHostingProcess>false</UseVSHostingProcess>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugSymbols>false</DebugSymbols>
        <DefineDebug>false</DefineDebug>
        <DefineTrace>true</DefineTrace>
        <IncrementalBuild>false</IncrementalBuild>
        <Optimize>true</Optimize>
        <OutputPath>bin\</OutputPath>
        <DefineConstants>_MyType="Windows"</DefineConstants>
        <DocumentationFile>CustomActivity.xml</DocumentationFile>
        <UseVSHostingProcess>false</UseVSHostingProcess>
      </PropertyGroup>
      <ItemGroup>
        <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <Name>System</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <Name>System.Data</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Deployment" />
        <Reference Include="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <Name>System.Transactions</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <Name>System.Xml</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Workflow.Activities, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Name>System.Workflow.Activities</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Workflow.ComponentModel, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Name>System.Workflow.ComponentModel</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
          <Name>System.Workflow.Runtime</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Name>System.Design</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Name>System.Drawing</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Name>System.Drawing.Design</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Windows.Forms">
          <Name>System.Windows.Forms</Name>
        </Reference>
        <Reference Include="mscorlib">
          <Name>mscorlib</Name>
        </Reference>
        <Reference Include="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86">
          <Name>System.Web</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
        <Reference Include="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Name>System.Web.Services</Name>
          <SpecificVersion>True</SpecificVersion>
        </Reference>
      </ItemGroup>
      <ItemGroup>
        <Import Include="Microsoft.VisualBasic" />
        <Import Include="System" />
        <Import Include="System.Collections" />
        <Import Include="System.Data" />
        <Import Include="System.Diagnostics" />
      </ItemGroup>
      <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.Targets" />
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.0\Workflow.VisualBasic.Targets" />
      <PropertyGroup>
        <PreBuildEvent>
        </PreBuildEvent>
        <PostBuildEvent>
        </PostBuildEvent>
      </PropertyGroup>
    </Project>
    
    <Project DefaultTargets="Build" xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <ProductVersion>8.0.50727</ProductVersion>
        <SchemaVersion>2.0</SchemaVersion>
        <ProjectGuid>{B33E8034-0FB5-4695-9171-D44E03F59C19}</ProjectGuid>
        <OutputType>WinExe</OutputType>
        <RootNamespace>WebTearWorkflow</RootNamespace>
        <AssemblyName>WebTearWorkflow</AssemblyName>
        <ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
        <WarningLevel>4</WarningLevel>
        <StartupObject>
        </StartupObject>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>.\bin\Debug\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <UseVSHostingProcess>false</UseVSHostingProcess>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
        <DebugSymbols>false</DebugSymbols>
        <Optimize>true</Optimize>
        <OutputPath>.\bin\Release\</OutputPath>
        <DefineConstants>TRACE</DefineConstants>
        <UseVSHostingProcess>false</UseVSHostingProcess>
      </PropertyGroup>
      <ItemGroup>
        <Reference Include="System.Windows.Forms" />
        <Reference Include="System.Workflow.Activities" />
        <Reference Include="System.Workflow.ComponentModel" />
        <Reference Include="System.Workflow.Runtime" />
        <Reference Include="System" />
        <Reference Include="System.Data" />
        <Reference Include="System.Design" />
        <Reference Include="System.Drawing" />
        <Reference Include="System.Drawing.Design" />
        <Reference Include="System.Transactions" />
        <Reference Include="System.Xml" />
        <Reference Include="System.Web" />
        <Reference Include="System.Web.Services" />
      </ItemGroup>
      <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.0\Workflow.Targets" />
    </Project>
    
  3. 프로젝트 파일을 프로젝트 디렉터리에 저장합니다.

코드 컴파일

코드 컴파일에 대한 자세한 내용은 코드 컴파일을 참조하십시오.

작업 2: 사용자 지정 활동 호스트 응용 프로그램 만들기에서는 이 자습서에서 사용되는 호스트 응용 프로그램을 만듭니다.

참고 항목

작업

작업 2: 사용자 지정 활동 호스트 응용 프로그램 만들기

기타 리소스

자습서: 사용자 지정 활동 만들기
Custom Activities

Footer image

Copyright © 2007 by Microsoft Corporation. All rights reserved.