Troubleshooting Canvas
Once you have begun creating screens with Canvas, you might try something that doesn't go as expected, including the following:
- Make a suggestion
- Report an issue
- Reset your workspace
- Resolve a preview (run mode) error
- Resolve a compiler (validation) error
- Resolve a .NET Reference Error
Make a Suggestion
- Consider options to a current function or behavior you would like to see changed.
- Imagine or provide an example of how a specific option or feature could behave to really impress you.
- Send us your feedback. Ask us, tell us, or show us!
Report an Issue
- Review the steps you took prior to the problem occurring.
- If possible, try reproducing the same process and seeing what results you get this time.
- Send us the exception report, including experience details.
Reset your Workspace
If your workspace is in a state such that you want to just start fresh, you can:
- In the Backstage view, click General Settings and then Settings folder to access your settings files.
- Close the Canvas application.
- Find the canvas.workspace file (Users\<CurrentUser>\AppData\Roaming\Canvas) and delete it. The workspace will be reset, and the file will be regenerated the next time Canvas is closed.
Resolve a Preview Error
When you preview a screen to view it in run mode, an error may occur, such as an expected CygNet value not resolving properly in your control. In this situation, perhaps the Point Tag format is incorrect. Try the following to learn more:
- Check your Canvas log file (for example, Canvas001.csv in the Users\<CurrentUser>\AppData\Local\CygNet\LogFiles\Canvas folder) to view more specific error messages or see additional details that could inform you about the error.
- Solve any likely issues that were found.
- Run the screen again to see if it now behaves as expected.
Resolve a Compiler Error
- When you validate script, an error may be reported, such as:
"The type or namespace name '{X}' does not exist in the namespace 'CygNet.API' (are you missing an assembly reference?)" - Perhaps the linked assembly is not located in the Global Assembly Cache, nor is it co-located with your Canvas application in the folder structure. If so, try the following:
- Copy the assembly to the same folder location as your Canvas.exe file.
- Restart your Canvas application.
- Validate the script to see if it compiles successfully.
Resolve a .NET Reference Error
Installing the Microsoft .NET Developer Pack after a scripted screen is created, may generate unresolvable assembly references in your screen, and you may get the following error when you attempt to compile:
The type 'Control' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Another indication that assembly references are unresolvable is the incomplete nature of the Assembly Manager. If you see hyperlinks rather than a list of assemblies, the Assembly Manager needs to be configured. See Configure Canvas for the First Time for more information.
Try the following to fix the screen:
- Complete the steps described in Configure Canvas for the First Time to configure the system assemblies.
- Create a new screen.
- Copy the controls from the original screen into the new screen.
- Enable scripting in the new screen.
- If the original screen includes any custom assembly references, add the same references to the new screen via the Assembly Manager.
- Copy any custom classes or initialization script (ScreenClassInitializer(), etc.) from the original screen to the corresponding locations in the new screen.
- For each control from the original screen:
- Examine the enabled events and enable the corresponding events in the new screen.
- Copy any custom script from the original screen’s events to the corresponding events in the new screen.
- Validate the new screen. There should be no compiler errors related to missing .NET Framework assemblies.
