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

Bundle CSS file not created #108

Closed
matthewblott opened this issue Oct 7, 2019 · 2 comments
Closed

Bundle CSS file not created #108

matthewblott opened this issue Oct 7, 2019 · 2 comments

Comments

@matthewblott
Copy link

@matthewblott matthewblott commented Oct 7, 2019

The css didn't appear to load and when I went to view the /css/bundle.css file I received the following error ...

TypeLoadException: Could not load type 'Microsoft.AspNetCore.Antiforgery.Internal.CryptographyAlgorithms' from assembly 'Microsoft.AspNetCore.Antiforgery, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

My setup is pretty vanilla - I copied what's on the homepage, here's my code.

services.AddWebOptimizer(pipeline =>
{
  pipeline.AddCssBundle("/dist/bundle.css", "css/**/*.css");
});

Any help appreciated :-)

@skimedic

This comment has been minimized.

Copy link
Collaborator

@skimedic skimedic commented Oct 7, 2019

It looks like you have loaded the wrong version of the package loaded. If you are using .NET Core 2.x, use the 1.x version of web optimizer. If you are using .NET Core 3.x, use the 3.x version

@matthewblott

This comment has been minimized.

Copy link
Author

@matthewblott matthewblott commented Oct 7, 2019

Ah, I upgraded to 3.0 recently. Thanks for the swift response (sorry to have bothered you with something so trivial!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.