I met some problem when I was trying to load CSV data into a DataTable:
error CS0234: The type or namespace name ‘Data’ does not exist in the namespace ‘System’ (are you missing an assembly reference?
So how can I solve this probem? Help!!!
Hello, everyone! I find a way to solve this problem:
Add this code to your module’s *.Build.cs
options.ScriptingAPI.FileReferences.Add("D:\\FlaxEngine\\Flax_12\\Source\\Platforms\\Editor\\Windows\\Mono\\lib\\mono\\4.5\\Facades\\System.Data.Common.dll");
options.ScriptingAPI.FileReferences.Add("D:\\FlaxEngine\\Flax_12\\Source\\Platforms\\Editor\\Windows\\Mono\\lib\\mono\\4.5-api\\System.Data.dll");
When you use this code, don’t forget to modify the directory.
Good solution but to make it even easier you can replace it with the following code in the module’s *.Build.cs
:
options.ScriptingAPI.SystemReferences.Add("System.Data");
Wow! It’s perfect! Thank you so much!!