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# Building Services with ASP.NET Web API Building Our Service Adding Web API to a Project

Balazs Peak
Balazs Peak
46,160 Points

several problems with this challenge

  1. there are errors in the testing architecture (Helpers/ExtensionMethods.cs)
  2. I can not upload my code because there is a 5MB limit

1 Answer

James Churchill
STAFF
James Churchill
Treehouse Teacher

Balazs,

Sorry to hear about the issues that you're running into with completing this local code challenge and for the overall lack of guidance.

There are two ways to create the ZIP file of your completed project files: manually or using the provided Gulp script.

To manually create the ZIP file, be sure to make the root of the ZIP file the folder that contains the "src" folder and the .gitignore, project.msbuild, and README.md files. Also, make sure that you delete the "packages" folder (located in the "src" folder) that contains all of the solution's NuGet package dependencies. Accidentally including the "packages" folder would definitely put you over the 5MB upload limit.

To make this process easier, we've included a Gulp script that you can run using Visual Studio's Task Runner Explorer. Running the default Gulp task will restore NuGet packages, build the solution, run the provided unit tests, and assuming that all of the tests pass, create a ZIP file of the solution. Information about the Gulp script can be found in the "Getting Started" section on the local code challenge page (https://teamtreehouse.com/library/building-services-with-aspnet-web-api/building-our-service/adding-web-api-to-a-project).

I realize that we can do a better job of preparing you (and others) for using local code challenges. To that end, I'll work on getting an instruction step added to the course ahead of this first challenge, that will cover everything that you need to know.

Please let me know if this gets you unstuck or if there's anything else that I can do to help.

Thanks ~James

Balazs Peak
Balazs Peak
46,160 Points

Thank you Master, appreciate the help!

Now that the 5 MB problem is clear, we can address the other problem. When I do everything the challenge is demanding, I get errors with the unit tests. The errors are pointing to the helper methods or some of the assemblies in the test project.

I've tried many different things, like updating the assemblies ... etc. but nothing seems to work. Any ideas? Do you want me to provide error messages or anything?

James Churchill
James Churchill
Treehouse Teacher

Yes, please provide the errors that you're seeing. Does the provided code successfully build before you make any changes to it?

Zhaopeng Wang
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Zhaopeng Wang
Full Stack JavaScript Techdegree Graduate 32,210 Points

Having the same problem here, the Gulp Task Runner cannot be called automatically using VS 2017. Have to install Gulp globally using npm, npm install gulp-cli -g and then use command line tool such as cmd to locate the project directory, ...src/IssueTracker Finally run gulp default, and it generate the project.zip file for me, so I can upload it, which solves my problem. Spent several hours trying to make it work, I am glad it works for me in the end.