1

I have a freshly created ASP.net web-site; it builds fine:

enter image description here

If i update the web.config to reference the Oracle.DataAccess.dll library:

<assemblies>
    <add assembly="Oracle.DataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
</assemblies>

The solution now fails to build with an error:

Error 2 Object reference not set to an instance of an object.

enter image description here

How do i make it not fail?

Bonus reading

Community
  • 1
  • 1
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • 2
    Note to later readers: there's a tendency to quickly close these as a duplicate of the canonical "Object reference not set" question. **This question is different**, because the error occurs during the build phase rather than at run time. – Joel Coehoorn Nov 17 '15 at 21:44
  • Now to address the OP: did you add this assembly by manually editing the web.config file or did you choose "Add Reference" from the menu? What happens if you remove the entry from your web.config file and use Visual Studio to add the reference? – Joel Coehoorn Nov 17 '15 at 21:47
  • @JoelCoehoorn I didn't type that myself (i don't know the public key token!); and used Visual Studio UI. – Ian Boyd Nov 18 '15 at 14:41

0 Answers0