Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
ASP.Net Core Website Files
OK, so I'm on a Mac, and I'm trying to complete this track using ASP.Net Core MVC rather than any of the ASP.Net 4.x releases.
Everything was functioning smoothly, except for now. I can't get it to render the site properly. It looks like a CSS error to me. I'm getting the layout because I get the footer and if I inspect it I can see the header calls to the css files, but the styling is not showing up. I double checked my _Layout.cshtml file and the path to the CSS file is correct, the reference to modernizr looks correct. I should not here I pulled the css, js, and images files out of wwwroot file that ASP.Net Core Generates, so that the paths from the treehouse files are all correct, but I'm still having issues. I get this is kind of unconventional since I'm asking about something this course doesn't cover verbatim.
Thanks for any help.
Well, I figured it out.
For all future users trying to do this with .Net Core, .Net Core has all of your static files in the wwwroot folder when the site is originally generated. If you want, you CAN change the name of the directory using the app.UseStaticFiles(new StaticFileOptions()) method in your startup.cs file. I'm leaving mine alone.
When you download the aspnet-mvc-basics-design-files.zip with the css, js, and image files, unzip the folder instead of placing the Content, Scripts, and Images folders in the root of your project, you just drop them in the wwwroot directory, and then all the references in the cshtml files should load properly.