Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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.