0

Trying to build a .DLL, I get, "The predefined type 'System.Runtime.CompilerServices.IsVolatile' is not defined or imported"

Yet, a solution-wide search for "IsVolatile" only turns up this:

//Keep around, might prove useful.
//namespace System.Runtime.CompilerServices
//{
//    public sealed class IsVolatile
//    {
//        private IsVolatile()
//        {
//        }
//    }
//}
// use: public volatile bool test;
//               ^
//               |-- volatile allow OS to interpret value. 

As you can see, every reference to "IsVolatile" is commented out. Even when I cut it out altogether, I still get that same err msg. Visual Studio (2003) itself doesn't know where it is, for 2-clicking the err msgs (there are three identical ones) goes nowhere.

What could cause that, and how can I rectify it?

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
  • 1
    I am struck how every one of your questions always has a downvote. You must have gotten on someone's bad side! Anyway, I'm assuming you cleaned the project, removing anything in the obj and bin folders? – tcarvin Oct 14 '14 at 13:06
  • Yes, somebody didn't get the new "Be Nice" policy (I have a saying on my pocket protector: "He hate me"). Anyway, I will try that (removing obj and bin - or just everything IN obj and bin?). Thanks! – B. Clay Shannon-B. Crow Raven Oct 14 '14 at 13:39
  • Deleted the contents of both folders, and I go from three errors (which were all the same, noted above) to 37! (FryingPan=>Fire). – B. Clay Shannon-B. Crow Raven Oct 14 '14 at 15:35
  • Where are your referenced external dependencies stored? They should be copied in to your bin/Debug (or whatever configuration you have setup) on rebuild. – tcarvin Oct 14 '14 at 15:41
  • I'm thinking it's probably some TFS problem, where these files I copied are still pointing somewhere else. Sometimes I think TFS (and its brethren) are more trouble than they are worth. – B. Clay Shannon-B. Crow Raven Oct 14 '14 at 15:42
  • 1
    I always create a folder as part of the solution called "referenced" and the referenced dlls etc there and in the project reference *that* location. Saves a lot of headaches. Never point directly to a vendor's install folder because an upgrade to their SDK for a different project will break your old project pointing to an older SDK. – tcarvin Oct 14 '14 at 15:47

0 Answers0