Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Add theme into existing Wasm Hosted project


Hi. I have been trying to use Metronic Theme in an existing WASM Hosted project, but when i run the app, it throws an error, it can't find the file: themesettings.json.

When i run your Blazor demo included in the download package, it runs without problems, but once i take the same directories and try to run in Client Project, it fails. the WASM solution has 3 projects, Server, Client and Share. Maybe there are something diferent when i run your demo is a Serverside app, but it does not work in Clientside mode.

I'm wondering if you can help me with it?

-------------------------------
Here is the error:
System.IO.FileNotFoundException: The configuration file '_keenthemes/config/themesettings.json' was not found and is not optional. The expected physical path was '/_keenthemes/config/themesettings.json'

-------------------------------
Here is the line in my Client.Program file:

string jsonDir = Path.Combine(AppContext.BaseDirectory, "_keenthemes/config/themesettings.json");
IConfiguration themeConfiguration = new ConfigurationBuilder()
.AddJsonFile(jsonDir)
.Build();


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

Thank you for reaching out to us.

Unfortunately, we have not yet attempted to convert our Blazor Server Side theme to Blazor WASM.

Based on the error message, it appears that the application is referencing a non-existent file. In the default package, we load themesettings.json from the _keenthemes/config folder. Please ensure that you have included this folder in your project and that themesettings.json exists in _keenthemes/config.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(