App_GlobalResource 폴더에 리소스 배포하기
맵핑 폴더를 가지고는 할 수가 없네요.
오늘은 빈 요소를 추가하여 배포하는 방법에 대해서 알아보도록 하겠습니다.
순서는 아래와 같습니다.
- Create Empty Sharepoint Project..
- Add a new Empty Element SPI (Project Item)
- Add Resource files in Empty element
- Selected Resource file
- Change the deployment type to AppGlobalResource
- Project Deploy..
배포 형식을 변경해야 합니다.
<asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:ResourceData, Success %>" />
위와 같이 사용하시면 됩니다.
그리고 Package Manifest의 내용은 아래와 같습니다.
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="5d99ee06-3444-4b23-b3ea-d07fca074486" SharePointProductVersion="14.0">
  <ApplicationResourceFiles>
    <App_GlobalResourceFile Location="SharePointProject1\App_GlobalResources\ResourceData.resx" />
  </ApplicationResourceFiles>
  <Assemblies>
    <Assembly Location="SharePointProject1.dll" DeploymentTarget="WebApplication" />
  </Assemblies>
  <RootFiles>
    <RootFile Location="Resources\ResourceData.resx" />
  </RootFiles>
  <TemplateFiles>
    <TemplateFile Location="Layouts\ScriptResources\ScriptResourceData.aspx" />
    <TemplateFile Location="Layouts\SharePointProject1\v4temp.master" />
    <TemplateFile Location="Layouts\ScriptResources\GlobalResourceTest.aspx" />
  </TemplateFiles>
  <FeatureManifests>
    <FeatureManifest Location="SharePointProject1_Feature1\Feature.xml" />
  </FeatureManifests>
</Solution> 
참고 경로는 아래와 같습니다.
AHow to: Add a Resource File
Localizing SharePoint Solutions
 
이상입니다.
 
'Developer' 카테고리의 다른 글
| EXTJS Custom GridPanel (0) | 2011.05.12 | 
|---|---|
| EXTJS Custom XmlTreeLoader (0) | 2011.05.12 | 
| Asp.net Create Custom Sql Sitemapprovider Sample (0) | 2011.04.04 | 
| C# SiteMapProvider [HttpException] {0} is not a valid virtual path(올바른 가상 경로가 아닙니다.) (0) | 2011.04.04 | 
| Sharepoint 2010 Script Resource(다국어) 처리 방법 (0) | 2011.04.01 |