DXA 2.2 .NET + Core and Search Module Solution build/configuration
- Download the following OOTB sources and modules from GitHub:
https://github.com/sdl/dxa-web-application-dotnet/tree/release/2.2
https://github.com/sdl/dxa-modules/tree/release/2.2
- Extract both sources zip and Go to dxa-modules-release-2.2\webapp-net this folder and copy Core and Search folder modules and also DxaModulesCommon.Props file
- Go to dxa-web-application-dotnet-release-2.2 folder and paste those folders and DxaModulesCommon.Props file here
- Open the DxaFramework.sln and click ok to ignore the unsupported Sdl.Web.Documentation project error message
- Right-click DxaFramework solution to add the following existing projects
- Core\Sdl.Web.Modules.Core.csproj
- Search\Sdl.Web.Modules.Search.csproj
- Search\SI4T.Query.CloudSearch\SI4T.Query.CloudSearch.csproj
- Go to Sdl.Web.Site project references and then right-click and add reference and then click left side Projects and select the following projects
- Sdl.Web.Modules.Core
- Sdl.Web.Modules.Search
- SI4T.Query.CloudSearch
- Right-click Sdl.Web.Modules.Core project and build
- Once successful build – expand the Sdl.Web.Modules.Core project and copy the Areas folder and go to Sdl.Web.Site project paste it in the root folder.
- Right-click Sdl.Web.Modules.Search project and build
- Once successful build – expand the Sdl.Web.Modules.Search project and copy the Areas folder and go to Sdl.Web.Site project pastes it in the root folder.
- Go to SDL.Web.Site and open web.config update the following configs sections
In the appSettings section Update the **Web.config** to change the default module to Core
<add key="default-module" value="Core" />
Also update the following configs to as per your cusotomer environment.
<add key="discovery-service-uri" value="http://localhost:8082/discovery.svc"/>
<add key="oauth-client-secret" value="xxxx" />
- Update the existing Unity Configuration type as follows, It's applicable only to sites 9.0+
<type type="ILocalizationResolver" mapTo="GraphQLLocalizationResolver">
<lifetime type="singleton" />
</type>
<type type="IModelServiceProvider" mapTo="GraphQLModelServiceProvider">
<lifetime type="singleton" />
</type>
<type type="IContentProvider" mapTo="GraphQLContentProvider">
<lifetime type="singleton" />
</type>
<type type="ILinkResolver" mapTo="GraphQLLinkResolver">
<lifetime type="singleton" />
</type>
<type type="IBinaryProvider" mapTo="GraphQLBinaryProvider">
<lifetime type="singleton" />
</type>
Copy cd_ambient_conf.xml config to keep in the website bin\config folder (File can be copied from SDL Tridion Sites Installation Media \Content Delivery\roles\api\rest\dotnet\config\cd_ambient_conf.xml)
Installing the Search module in the web application
Open Unity.config to update to add the following config sections
Add UnityDeclaration:
<assembly name="Sdl.Web.Modules.Search" />
<namespace name="Sdl.Web.Modules.Search.Providers" />
Set UnityTypeMapping:
<type type="ISearchProvider" mapTo="IQSearchProvider" />
Update web.config to add elastic index name
<add key="iq-search-index" value="udp-index" />
Note:
In order to use GraphQLContentProvider, mandatory to Install the DXA Model Extension for Model support – Tridion Sites 9.0+
Install the DXA Model Extension in Content Service, Download the DXA model extension file
and extract from \SDL DXA .NET 2.2\cis\udp-content-dxa-extension\udp-content-dxa-extension-assembly-11.0.0-1077-core.zip
How to install the DXA Model Service extension
I hope it helps