Errors & warnings after putting Project in TFS

2020-02-07 11:14发布

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();

标签: tfs
1条回答
放我归山
2楼-- · 2020-02-07 11:40

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?

查看更多
登录 后发表回答