I have created a web application,it is getting build successfully with 0 error & warning,now i have one more member with me to work on same project,i have migrated my solution to TFS,but now while building i am getting 5 errors and 221 warnings.
Error is same on 5 locations(The call is ambiguous between the following methods or properties: 'ExtensionMethods.ChkDBNull(object)' and 'ExtensionMethods.ChkDBNull(object)')AND
Warning is also same in 221 differernt location with different files and classes (The type 'TravelsManagementSystem.Forms.Master.TravelPlaceMst.DALTravelPlace' in 'D:\Anuj\Projects\Travel\TravelsManagementSystem\App_Code\DAL\Master\DALTravelPlace.cs' conflicts with the imported type 'TravelsManagementSystem.Forms.Master.TravelPlaceMst.DALTravelPlace' in 'd:\Anuj\Projects\Travel\TravelsManagementSystem\bin\TravelsManagementSystem.dll'. Using the type defined in 'D:\Anuj\Projects\Travel\TravelsManagementSystem\App_Code\DAL\Master\DALTravelPlace.cs'. D:\Anuj\Projects\Travel\TravelsManagementSystem\App_Code\BLL\Master\BLLTravelPlace.cs)
This is the extension method for checking null
public static class ExtensionMethods
{
public static Object ChkDBNull(this object obj)
{
if (obj != null)
{ return obj; }
else
{ return DBNull.Value; }
}
}
it is used while inserting data
OraPara[i + 5] = new OracleParameter("ic_consulate_addr3", OracleType.VarChar);
OraPara[i + 5].Value = objBELConsulate._CONSULATE_ADDR3.ChkDBNull();
OraPara[i + 6] = new OracleParameter("ic_consulate_addr4", OracleType.VarChar);
OraPara[i + 6].Value = objBELConsulate._CONSULATE_ADDR4.ChkDBNull();
It looks like you may have accidentally dragged a folder from one project to another effectively duplicating the code in your system.
Is the folder D:\Anuj\Projects\Travel\TravelsManagementSystem\App_Code for a website? and should there be a DAL folder in there?