Open asusralis opened 5 years ago
I think it is specific to visual studio, have you tried it with latest visual studio on Windows10? Mac Visual studio is very buggy.
Hey! Yes, I have the latest Visual Studio of 2019 (16.2.5). It's interesting because it's always from Zenject/PlaceholderFactory. No other library gives me this issue.
Here is the output:
------ Rebuild All started: Project: Assembly-CSharp-Editor-firstpass, Configuration: Debug Any CPU ------ error CS0009: Metadata file 'C:\XXX\Temp\UnityVS_bin\Debug\Zenject.dll' could not be opened -- Could not find a part of the path 'C:\XXX\Temp\UnityVS_bin\Debug\Zenject.dll'. ------ Rebuild All started: Project: Assembly-CSharp-Editor, Configuration: Debug Any CPU ------ error CS0009: Metadata file 'C:\XXX\Temp\UnityVS_bin\Debug\Zenject.dll' could not be opened -- Could not find a part of the path 'C:\XXX\Temp\UnityVS_bin\Debug\Zenject.dll'. ========== Rebuild All: 3 succeeded, 5 failed, 0 skipped ==========
Deleting all project/sln files fixes this issue, but it eventually comes back.
Use Rider its amazing BTW... but its paid...
On Linux with VSCode (backed by Mono I think), Unity 2019.3, I'm getting The type or namespace name 'PlaceholderFactory<>' could not be found (are you missing a using directive or an assembly reference?)
. I'm using Zenject;
in the script this is coming from, and other Zenject classes. Haven't been able to get it working, tried deleting the .sln, tried reinstalling Extenject from Assets Store with everything checked, so I have to avoid using PlaceholderFactory :grimacing:
Maybe this is a Linux issue, I'm also having problems using SignalBus
What unity and visual studio version are you on? I haven't had this problem in a long time, but I have no idea what fixed it.
just updated. ^ I'm not using Visual Studio, I'm using VSCode
Update: my problems were due to using an assembly definition in Scripts/ and not referencing the Zenject assembly definition in it, so core Zenject worked but PlaceholderFactory (and SignalBus) wouldn't get resolved
I've had this problem for a few months now, and it seems random for when it happens.
It seems that PlaceholderFactory likes to act like it isn't a class which with give errors saying it cannot be found. This only happens in VS as Unity will compile and run, but VS will not compile which will lead to me not being able to debug.
It seems like PlaceholderFactory is the only class that gives trouble as other classes in Zenject - even in the same file - will not give any errors. I've fixed this by exiting Unity, deleting all my sln/vsprog files, and running Unity again. This will work for a time until the problem randomly comes back.
I'm free to dig deeper into this, but I'm not sure where to start as it is very random.