No Bundle Renders, Compilation Error Creating Bundle inside Masterpage
First off, holy crap, you guys. This package is going to be awesome.
Here's what I've found so far.
First off, based on the documentation I was able to find, I expected to be able to just drop
@Styles.Render("~/bundles/bundleOne")
right into the masterpage after installing the package, and having spit out, like, whatever was in my bundle. That didn't happen - it just left it right like that in the HTML. So I figured I didn't understand.
Right about then I found the 'create a bundle' button in the Template editor. (High five on that idea, by the way. That couldn't be easier. Like, whoa. There's almost literally no excuse not to bundle up code now. Unbelievable.)
So, after I do that automatic bundle button thing, when I pull up the page, I get
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'Styles' does not exist in the current context
Source Error:
Line 12: <title>Test Page</title>
Line 13: <meta name="description" content="">
Line 14: <%: Styles.Render("~/bundles/bundleOne") %>
Line 15: <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" rel="stylesheet" type="text/css">
Line 16:
Source File: c:\Documents and Settings\Server\My Documents\My Web Sites\Umbraco CMS with Optimus\Masterpages\ACO-Master.master Line: 14
So those are my bugs. I don't have any ideas on how to try and fix "Compiler Error Message: CS0103: The name 'Styles' does not exist in the current context."
This is a quick and dirty 6.1.2 running on WebMatrix 2.0. I THINK I got all the manual adds to the two web.configs correct - most pertinently the <add namespace="System.Web.Optimization" /> at configuration > system.web.webPages.razor > pages > namespaces in views/web.config. I double-checked all the adds, but I'd be happy to triple check anything if you suggest that may be the issue.
Thanks a bunch, guys. The back office stuff is looking really, really good. In my super humble opinion, this has 'added to the core for v7.0' written all over it. Because, dang.
Ah the editor ate my formating, web.config addon will look like this (makes sure the namespace is included on your masterpages system.web/pages element)
I saw that you were going to get it automated by Friday, I'm just super impatient. Been hoping someone(s) smarter than me would create something exactly like this for a while now.
No Bundle Renders, Compilation Error Creating Bundle inside Masterpage
First off, holy crap, you guys. This package is going to be awesome.
Here's what I've found so far.
First off, based on the documentation I was able to find, I expected to be able to just drop
right into the masterpage after installing the package, and having spit out, like, whatever was in my bundle. That didn't happen - it just left it right like that in the HTML. So I figured I didn't understand.
Right about then I found the 'create a bundle' button in the Template editor. (High five on that idea, by the way. That couldn't be easier. Like, whoa. There's almost literally no excuse not to bundle up code now. Unbelievable.)
So, after I do that automatic bundle button thing, when I pull up the page, I get
So those are my bugs. I don't have any ideas on how to try and fix "Compiler Error Message: CS0103: The name 'Styles' does not exist in the current context."
This is a quick and dirty 6.1.2 running on WebMatrix 2.0. I THINK I got all the manual adds to the two web.configs correct - most pertinently the <add namespace="System.Web.Optimization" /> at configuration > system.web.webPages.razor > pages > namespaces in views/web.config. I double-checked all the adds, but I'd be happy to triple check anything if you suggest that may be the issue.
Thanks a bunch, guys. The back office stuff is looking really, really good. In my super humble opinion, this has 'added to the core for v7.0' written all over it. Because, dang.
By the way, I installed both SASS and LESS for this runthrough, but neither of the script providers.
Hi Brenton,
Almost there, you'll also need this in your web.config (in the pages element)
And the code you need to include it on a masterpage is
<%: Styles.Render("~/bundles/myBundle") %>
Ah the editor ate my formating, web.config addon will look like this (makes sure the namespace is included on your masterpages system.web/pages element)
Should be done automatically friday when we release the stable version ;) thanks for the feedback!
I saw that you were going to get it automated by Friday, I'm just super impatient. Been hoping someone(s) smarter than me would create something exactly like this for a while now.
And, you should know ... IT WORKS! Yes!
Sweet, thanks for confirming :)
And don't forgot to vote for the package if you like it ;)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.