Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom theme : ThemeTogglerService not found #14811

Closed
agriffard opened this issue Dec 2, 2023 · 3 comments
Closed

Custom theme : ThemeTogglerService not found #14811

agriffard opened this issue Dec 2, 2023 · 3 comments

Comments

@agriffard
Copy link
Member

I try to make a new theme with the latest version.
I created a OC webapp in .NET 8 with OC 1.8 preview packages with Nuget.config adding preview source :
<add key="OrchardCore" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" />

I made a custom theme that is a copy of TheTheme.
I use the equivalent of the packages referenced in https://github.com/OrchardCMS/OrchardCore/blob/main/src/OrchardCore.Themes/TheTheme/TheTheme.csproj but as Nuget packages:

        <ItemGroup>
		<PackageReference Include="OrchardCore.Theme.Targets" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.Admin.Abstractions" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.ContentManagement" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.DisplayManagement" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.Flows" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.Menu" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.Notifications" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.ResourceManagement" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.Users.Abstractions" Version="1.8.0-preview-17831" />
		<PackageReference Include="OrchardCore.Users" Version="1.8.0-preview-17831" />
	</ItemGroup>

My problem is that the namespace OrchardCore.Themes.Services is not found so in the Layout, this does not work:

@inject ThemeTogglerService ThemeTogglerService

@jtkech
Copy link
Member

jtkech commented Dec 2, 2023

At least the equivalent of this reference is missing

<ProjectReference Include="..\..\OrchardCore.Modules\OrchardCore.Themes\OrchardCore.Themes.csproj" />

@agriffard
Copy link
Member Author

Ok, I am dumb, I searched for OrchardCore.Theme because I removed .Targets and didn't find it because it is OrchardCore.Themes with an 's'.

@jtkech
Copy link
Member

jtkech commented Dec 2, 2023

No problem, typo issues happen to me often too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants