# Edit websitestrings in litium /

**URL:** <https://forum.litium.com/t/edit-websitestrings-in-litium/308>\
**Category:** Questions\
**Created:** [October 23, 2018, 12:24pm UTC](https://forum.litium.com/t/edit-websitestrings-in-litium/308 "2018-10-23T12:24:23Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [December 26, 2018, 10:10am UTC](https://forum.litium.com/t/edit-websitestrings-in-litium/308/11 "2018-12-26T10:10:30Z")

</div>

If you use multiple different build configurations you may need to change the csproj-file for the project and also the `ExtensionsModuleRouterInitTask` to build and include the compiled js-file as a resource.

The csproj-file is the section

```xml
  <ItemGroup>
    <EmbeddedResource Include="dist\Accelerator.js" Condition="'$(Configuration)' == 'Release' OR $(DefineConstants.Contains('BUILD_PACKAGE'))" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="dist\Accelerator.js.map" Condition="'$(Configuration)' == 'Release' OR $(DefineConstants.Contains('BUILD_PACKAGE'))" />
  </ItemGroup>

```

in this snippet we can see that the we include the embedded resource if the configuration is release or the definition constant `BUILD_PACKAGE` is set.

If we check the `ExtensionsModuleRouterInitTask` it looks like the following

```auto
        public void Init(IEnumerable<Assembly> assemblies)
        {
#if DEBUG && !BUILD_PACKAGE
            PackageManager.Register("~/Litium/Client/Scripts/dist", new DirectoryInfo($"{HostingEnvironment.MapPath("~/")}../{GetType().Assembly.GetName().Name}/dist").FullName);
#else
            PackageManager.Register("~/Litium/Client/Scripts", GetType().Assembly);
#endif
        }

```

where we can see that we using the embedded resource if we not building in `DEBUG`-mode and not have the `BUILD_PACKAGE` definition constant set.

So if you have more build configuration that you need to get the embedded resources included you can set the `BUILD_PACKAGE` definition constant in them.

The reason that we not included the generated JavaScript file when building in `DEBUG` is to allow the developer easy make changes in the JavaScript (TypeScript) source and get that changes included in the UI directly without needing to compile and restart the application.

I can see in the conditions from the csproj and the cs-file that the logic not is exactly the same but will correct that in next release.

If you want to do the changes by yourself it will be something like the following that will include the embedded files in all builds except the debug. Changes for the csproj, remeber to replace the nodes that already exists.

```auto
  <PropertyGroup Condition="'$(BuildPackage)' == 'true' Or '$(BuildUIPackage)' == 'true' Or '$(Configuration)' != 'Debug'">
    <DefineConstants>$(DefineConstants);BUILD_PACKAGE</DefineConstants>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedResource Include="dist\Accelerator.js" Condition="$(DefineConstants.Contains('BUILD_PACKAGE'))" />
    <EmbeddedResource Include="dist\Accelerator.js.map" Condition="$(DefineConstants.Contains('BUILD_PACKAGE'))" />
  </ItemGroup>

```

and the `ExtensionsModuleRouterInitTask`

```auto
#if BUILD_PACKAGE
            PackageManager.Register("~/Litium/Client/Scripts", GetType().Assembly);
#else
            PackageManager.Register("~/Litium/Client/Scripts/dist", new DirectoryInfo($"{HostingEnvironment.MapPath("~/")}../{GetType().Assembly.GetName().Name}/dist").FullName);
#endif

```

With this changes you may still have problem if you deploy a debug-build with webdeploy without explicit setting the `BUILD_PACKAGE` definition constant for debug builds.

---

_[View the full topic](https://forum.litium.com/t/edit-websitestrings-in-litium/308)._
