AB4D Forum

Full Version: Problem with assembly reference
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am targeting .NET 4.5, using the latest PowerToys.dll for 4.5. I have three statements that are giving hard errors:
The name "CameraAxisPanel" does not exist in the namespace "clr-namespace:Ab3d.Controls;assembly=Ab3d.PowerToys".
The other two errors are for MouseCameraController and Scene Camera.

If I look at the assembly in the Object Viewer, all three of these exist.

If I debug the program it compiles as if there were no errors, but because of the error, I have an invalid Markup in the xaml file which does not allow the layout to be seen.

I have attempted to move these statements but the problem never goes away. I opened one of the sample files that used these statements and the problem exists there, too, so I know I have a configuration issue, but am unsure where to look.

Thanks,
Lloyd
I have seen similar problems some time ago. I am not sure what I did but the problems disappeared.

After your post, I have tried to reproduce the problem with using the three controls that you mentioned but was not able to get an error. I have tried also with using different versions of PowerToys. I have also opened every single xaml file that comes with Ab3d.PowerToys samples project and all the files were shown correctly.

Also if you search the internet for similar problems, you will find that this is quite common problem.

It is hard to say what could be causing the problem. Maybe you can try any of the following:

- Change platform target to x64 and then back to "Any Cpu" or x86 (this reloads many settings in VS; also note that designed does not work well in x64, but the point here is to try to reload VS settings)

- Change reference to some other version of Ab3d.PowerToys - is the problem still there?

- If you are using pre-release version of Ab3d.PowerToys, then maybe the dlls are marked as "unsafe" because they are downloaded from web site and this can make them "Not fully trusted" by default. Right click on the dll and if you see an "Unblock" button in the file properties, click it so that VS will have a fully trusted assembly.

- Rename the .suo file (solution user settings)

- Rename the "Design" folder under Ab3d.PowerToys\bin\net45 - this will prevent loading the Visual studio design assembly when the Ab3d.PowerToys library is used - maybe the problem is caused by a custom designer settings that are defined in the Ab3d.PowerToys.Design.4.0.dll assembly.

- Clean temp folder "%LOCALAPPDATA%\temp"

- Clean the Visual studio designer shadow cache. The shadow cache for VS 2015 is located in "%LOCALAPPDATA%\Microsoft\VisualStudio\14.0\Designer\ShadowCache". To be a little bit safer in case of problems, rename the ShadowCache folder instead of deleting it - this way it will be easier to restore it in case of problems. Also, do this at your own risk.


I hope that any of those tips will help you solve the problem - if this will be resolved, please report what helped.
I worked my way down your list and first found that if I used an older assembly the problem went away which indicated that a security issue was a good possibility.

I then clicked on the .dll assembly > Properties > Unblock and that resolved the issue.

Thanks Andrej!