none
Visual Studio 2010 Trial, Build Error "Object reference not set to an instance of an object" RRS feed

  • Question

  • I have a Visual Studio 2005 ASP.Net Project which i upgraded to Visual Studio 2010 and am using .NET Framework 4.0 as target output.

    All assembly referenced in my web.config are pointing to 4.0 assemblies

    I have 40 to 50 crysral reports in this project as well

    When i build my project it gives Build (web): Object reference not set to an instance of an object message in output window and compilation failes

    When i re-compile couple of times, the project at last complies succsessfully

    I tried upgrading the Crystal reports as well by editing them in VS2010 and save them with an upgrade, but the problem is still there.

    After investigating in this issue i found that there was following construct in my <compilation> section of web.config:

    <buildProviders>
            <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
          </buildProviders>

    When i comment this section, compilation completes in first go:

    Also if i add <clear/>, the problem goes away as well:

    <buildProviders>
            <clear/>
            <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
          </buildProviders>

     

    I am unable to locate the root cause till now, if any one had this issue and a solution is there, please let me know, Thanks.

    • Moved by Harry Zhu Tuesday, June 8, 2010 1:49 AM (From:Crystal Reports for Visual Studio)
    Tuesday, June 1, 2010 6:16 AM

All replies

  • Also doing this remove the error as well:

    <buildProviders>
            <add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
            <remove extension=".rpt"/>
          </buildProviders>

    Tuesday, June 1, 2010 6:39 AM
  • Hi,
    For questions relating to crystal report in asp.net, please post to :
    http://forums.asp.net/76.aspx .  You will get better and quicker responses from the experts there.
    Harry


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, June 7, 2010 2:22 AM