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# ASP.NET MVC Forms Creating a Basic Form Getting Familiar with Our HTML Form

Kevin Gates
Kevin Gates
15,053 Points

Using Visual Studio 2017, I get a: Could not find a part of the path 'C:\Users\...\FitnessFrog\bin\roslyn\csc.exe'.

I don't know if the older files used that, but new ones do not. Not sure how to fix the error.

4 Answers

Kevin Gates
Kevin Gates
15,053 Points

I found the solution after being inspired by a StackOverflow message.

The default files use a NuGet package for compiler that is 1.0.0 and that isn't able to compile the code. If you update that package for this solution folder to the latest version, then everything works well.

Joshua Dawson
Joshua Dawson
1,178 Points

The above comment is correct. Here is an easy way to update the NuGet Packages.

Right click on your project source and select manage NuGet Packages. You will see a browse , install, and update tab. Select the update tab and you should see several NuGet packages that require updating. Process the updates. Once complete I like to right click on the project source and rebuild. Once build is complete without any errors trying opening the page again. It should open without any problems now.

Dmitri Mikhalev
Dmitri Mikhalev
4,462 Points

Hi there, got the same issue.

What do you mean by right click on your project source? Like on the project name in the soolution explorer (probably not, since I don't see it there) anything else?

Thanks in advance for your help

Dmitri Mikhalev
Dmitri Mikhalev
4,462 Points

I'm sorry, I found it and did the update, but it seems to have made stuff even worse...

Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

So this makes our project solution completely different than what the instructor has. It's adding bootstrap file when you update newget and other things. Million dollar question is why does this work for the instructor without updating newget packages?

Kevin Gates
Kevin Gates
15,053 Points

Other starting code may have been different? Not sure entirely.

I would recommend not updating the bootstrap 3.0 to the newer 4.x version as this will be vastly different from what is in the videos. Probably should not update the jquery either for potential compatibility issues (I don't know if there would be any). For my solution, I updated all other packages. As for why the instructor didn't have to update his newget packages, that is because this video was recorded a few years ago (I think), so his solution would have been up to date.