Troubleshooting
Install and Updates
Configuring Activate V8.2 After Upgrade: Resolving Error CS0012
2 min
after upgrading to activate v8 2, which is built using net 8, you may encounter (something similar to) the following error error cs0012 the type 'attribute' is defined in an assembly that is not referenced you must add a reference to assembly 'netstandard, version=2 0 0 0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51' this error occurs because the script is using an outdated package below is an example of a script that might throw this error //@import system private servicemodel using innovation activate; class script scriptbase { public void main() { logaudit("test"); } } \[system servicemodel servicecontractattribute(namespace = "http //my name space com/", configurationname = "myconnectorsoap")] interface myconnectorsoap { } in v8, this script throws the error due to the lack of support for older net technology, specifically the system private servicemodel library the solution is to import the netstandard library the netstandard library is a formal specification of net apis that are intended to be available on all net implementations here is the corrected script //@import system private servicemodel //@import netstandard using innovation activate; class script scriptbase { public void main() { logaudit("test"); } } \[system servicemodel servicecontractattribute(namespace = "http //my name space com/", configurationname = "myconnectorsoap")] interface myconnectorsoap { } by adding the netstandard library, you ensure compatibility with the new net 8 framework, resolving the error and allowing your script to function correctly