Link to home
Start Free TrialLog in
Avatar of mikha
mikhaFlag for United States of America

asked on

asp.net compilation/runtime error

I have an ASP.NET web forms project, currently running in .net 4.5 version. I am trying to migrate the source code to bitbucket. I pushed the code and compiled the project successfully. when I try to run the project, I get an runtime error shown below -

Could not load file or assembly <add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral  ....

In the project, under references I see system.web.helpers.dll, but the inside the folder  (C:\documents\repos\myproject\bin\System.Web.Helpers.dll )  the dll is not there.

when i go to nuget package manager , and search for system.web.helpers.dll , I can't find it.

Questions -

1. Is this dll no longer available and is replaced by something else?
2. I suppose, when the project was created initially, a reference to dll was added to the project. and looking at the folder path for the dll in the project ( C:\documents\repos\myproject\bin\System.Web.Helpers.dll), when i did a clean build the dll must have been deleted . when the dll was added initially, was it supposed to be in the bin folder?
3. or was this dll availabe in older version of .net ? if i update the .net framework version, I would probably need to update other dlls too, which I am trying to avoid.
4. what are best practices in such situations?
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mikha

ASKER

thanks @Miguel Oz . I have a follow up question.

1. I installed Microsoft.AspNet.WebPages  via Nuget package manager. It downloaded the dll in -->
    packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40              folder and also added it under reference in my project.
    I know nuget keeps track of the project dependencies in package.json file. but this packages folder that it added, is this something we have to keep track of in the code repository? or when someone else clones the project , nuget will automatically download the dependencies in their machine also?
You shall open a new question for this one, only for this time YES you shall add package.json to your source control.