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 trialHugo Zaanen
11,897 Pointshow to get .dll file
I don't know how to upload the file as a .dll file. The example from Selecting, Projecting and anonymous Types you download a zip file with BirdWatcher.sln, but there isn't a .dll file as far as i see, so what do i have to do.
2 Answers
Andrew Rodko
27,881 PointsUnder the File menu of the Workspace, you could select "Download Workspace", and that will download a zip file of the project that contains the dll file.
Stephan Doens
2,796 PointsI downloaded the zip file from the downloads section, but, as I'm using VS Code in a .net interactive notebook, and the zip is not useable immediately as is...
I unzipped to a new folder, removed the bin, obj, properties folders.
then did a
dotnet new classlib --force
dotnet clean
dotnet build
within that folder, to create the DLL.
in .net interactive notebooks in vs code, I then need to use
#r "BirdWatcher/bin/Debug/net6.0/BirdWatcher.dll"
using BirdWatcher;
to be able to create the List of Birds
List<BirdWatcher.Bird> birds = BirdRepository.LoadBirds();
note: I needed to prefix the Bird class with the namespace 'BirdWatcher', as I already have a 'local' Bird class in my notebook...