locked
Force Web Site Project to Use A Specific Namespace RRS feed

  • Question

  • User-1933957973 posted

    First off I'm not much of an ASP Developer. I do the build/deploy function and manage TFS so there may be something really simple here that I am not aware of.

    I recently upgraded TFS from 2010 to 2012.  After that I began to get an error building a solution that contains a number of class lib projects and 2 web site projects. The error is occuring on several pages that reference a VirtualItemCount property.

    A little background - this solution began back in the VS 2005 days. The web.config for the web projects did not have any assemblies referenced other than the class lib projects I mentioned. So there is one question I have:

    Where are all the default namespace references contained? I thought it was in a "global" web.config. Right?

    Somewhere along the way a custom GridView was developed to manage custom paging. This custom GV inherited from the default GridView that comes from System.Web.UI.Webcontrols.

    Before the 2012 upgrade the default GridView did not have a VirtualItemCount property so one was declared in the custom GV. Apparently 2012 brings this property to play in the default GV. So when I build the solution it barks about not being able to set the property.

    One of the class libs contains the custom GV and does the inheriting of the default GV. This project seems to still be using the 4.0 version of the gridview. I assume this is because it has a project file and an explicit reference to System.Web.

    ON the other hand the web site project has no project file and its web.config does not have a reference to System.Web. I tried adding a reference but I get an errror stating System.Web is already referenced. No idea where.

    This problem surfaced after the TFS upgrade to 2012 but I get similar results on development workstations. One environment has only VS 2010 components and the solution builds OK . Another environment has VS 2010 and VS 2012 and the same error occurs even when using VS 2010.

    So at the end of all this what I want to do if possible is force the usage of the old System.Web and GridView.

    I would appreciate any ideas or suggestions.........

    Wednesday, April 17, 2013 9:49 PM

Answers

  • User-166373564 posted

    Hi mikiekbdXC

    I recently upgraded TFS from 2010 to 2012.  After that I began to get an error building a solution that contains a number of class lib projects and 2 web site projects.

    Perhaps there is something wrong during you update from TFS 2010 to TFS 2012, you would obviously lose some functionality that is built between the two, but overall it works well. At the same time you could learn the procedures that update from TFS 2010 to TFS 2012 below,

    Upgrading TFS 2010 to 2012 (or VSS to 2012)

    Upgrading TFS 2010 to TFS 2012 with VSS Migration and Process Template consolidation

    One environment has only VS 2010 components and the solution builds OK . Another environment has VS 2010 and VS 2012 and the same error occurs even when using VS 2010.

    As I know, we can  install Visual Studio Versions Side-by-Side,

    Installing Visual Studio Versions Side-by-Side(http://msdn.microsoft.com/en-us/library/ms246609%28v=VS.110%29.aspx)

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 23, 2013 6:40 AM