0

I'm not exactly a master of TeamCity (yet!) so please accept my apologies if this question is poorly formulated.

In my local IDE I can rebuild the solution. In TeamCity, I can do that too. Then, I add a new project, which has a reference to an external DLL (Oracle.DataAccess). While the local version builds without problems, I now get an error when running the build from TeamCity.

It claims that the problem is as follows.

error CS0012:
The type 'Oracle.DataAccess.Client.OracleDbType' is defined in an assembly that is not referenced.
You must add a reference to assembly 'Oracle.DataAccess,
Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342'.

  1. Why does it complain about it when the local rebuild works?
  2. What can be done about it?

I've checked that I'm targeting the correct repository to avoid this mistake. The only thing that changes is that I'm adding the project to the solution. I also noticed that removing the reference from the project fails the local build with the same message as the TC's. However, readding the reference to it (followed by a check-in) doesn't reciprocate the success of rebuild...

Suggestions?!

Community
  • 1
  • 1
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
  • 1
    Make a folder in your project "libs" that contains all the libraries you use. Check them into the SVN and try that. – Dean.DePue Jun 16 '14 at 16:52

1 Answers1

2

Make sure that reference to Oracle.DataAccess has attribute CopyLocal = true.

Also, take a look at the other properties as well. The path might be set to a locally available drive pointing to a file that isn't checked in to the VCS.

Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
Volma
  • 1,305
  • 9
  • 17
  • You can set it in Visual Studio, right click on the reference , select Properties, and in the properties panel set Copy Local = True – Volma Jun 16 '14 at 16:54
  • Thanks - as I wrote I've found that. However, you might just have helped me anyway. I just saw that the path of the little #¤%&er is set to local *C:\Oracle\...*! – Konrad Viltersten Jun 16 '14 at 16:55
  • Edit your reply to include what I wrote (and combine it with the comment made by Dean) and I'll check you green as an answer. +1 in any case! – Konrad Viltersten Jun 16 '14 at 17:04
  • Hahaha, no worries Konrad, this is not a contest, thanks for wanting to give credit, but it's not important to me... Happy coding! – Volma Jun 16 '14 at 17:06
  • I like your attitude. However, I prefer to close the questions I ask if there's some guidance provided. In this case, there is but it's - sort of - half in the reply and half in the comments, which can make it harder for a future (and lazy-ish) reader to get. I'll take the liberty of editing your reply before accepting it, then. :) – Konrad Viltersten Jun 16 '14 at 20:51