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

C#

ComicBookGalleryModel.Context Database not appearing in SQL Server Object Explorer

I am using Visual Studio 2017 Community and have verified my SQLLocalDb is installed. My solution builds without errors but when I run the application I see a blank console. Furthermore, ComicBookGalleryModel.Context Database is not appearing in SQL Server Object Explorer. Only folders for Databases, Security, and Server Objects and a MSSQLLocalDB database appear. I forked the code from the GitHub repository to ensure I had no errors in my code but still am having the same issue with both the blank console and the database not appearing in the Object Explorer. Is this database icon located somewhere else in this version of Visual Studio or am I missing something obvious?

Chris Jones
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Jones
Java Web Development Techdegree Graduate 23,933 Points

Hey Anthony,

I could be missing something, but I don't see a link to your GitHub repo. Can you share that?

Also, have you tried this in Visual Studio 2015? I ask because I tried downloading 2017 and found it to be really buggy. After reading a couple Stack Overflow threads, I found that other people found 2017 to be buggy also. So, I've switched back to 2015 since then.

2 Answers

I haven't tried using Visual Studio 2015 yet. That may be something worth looking into. I used the code from the following:

https://github.com/treehouse-projects/dotnet-comic-book-gallery-model/tree/eac8dd92514aa4b2355857d98259747e20af12f6/src/ComicBookGalleryModel

You probably already figured out what your issue was, but for those who may find this when seeking a solution, I'll add what worked for me. I'm also using VS 2017 (though I don't think that has anything to do with this issue) and was not seeing the Comic Book Gallery Model database in the SQL Server Object View.

If you took a break between the last stage and this one, or quit your solution for any reason, try running the console app in program.cs again. Once I did that, it (re-)created the database.