简体   繁体   中英

The type or namespace name `IGraphResult` could not be found. But it's there and it works fine elsewhere

I ended up chasing ghosts once again, this time the thing that's driving me crazy is a using statement that seems to be deciding to stop working on a single file and at build time only. It's about the IGraphResult object contained inside the Facebook.Unity namespace.

I have checked the #if statements multiple times on both the using statement and the actual line that references it. The usage is perfectly mirrored on several other files, but when it comes to making the build, regardless of applying totally unrelated scripting define symbols, it seems to cause only that single file to stop recognising IGraphResult as a thing.

A few facts:

  • Neither the mentioned file nor the other non-problematic usages files are inside a Plugins folder
  • The using statement and the actual usages are only filtered out for #if !NETFX_CORE
  • I have put in the editor the exact same scripting defines injected at build time and it compiles perfectly, still it fails for that file only when building
  • This exact same code perfectly compiles on a colleague's machine
  • We have no local changes

What could cause Unity3D to selectively forget a namespace or ignore a using statement on a single file?

Can anybody suggest other ways to approach this issue?

Turns out it was due to some assemblies not being correctly imported for the tvOS platform.

Somehow this wasn't showing in source control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM