{"article":{"art_type":1,"created_at":"2016-12-28T16:24:01-07:00","current_child_thumbs_down":3,"current_child_thumbs_up":3,"desc_un_html":" FIXED\u00a0in ElumTools 2015.11, 2016.8, 2017.4 and later. ElumTools uses a popular 3rd party library called JSON.Net. \u00a0In previous versions of ElumTools, this library was known to cause conflicts when other Add-ins using JSON.net were installed alongside ElumTools, as well as an incompatibility with Revit 2017. 2 (17.0.1117.0). \u00a0Such conflicts often resulted in an error like the one below, most commonly when using commands involving calculation points. Could not deserialize Definition. \u00a0 Exception: Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'Lai.Core.CalcPoints.SimpleDefinition, Lai.Core'. Path 'DataObject.$type', line 1, position 98. ---> Newtonsoft.Json.JsonSerializationException: Could not load assembly 'Lai.Core'. at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(TypeNameKey typeNameKey) at Newtonsoft.Json.Utilities.ThreadSafeStore`2.AddValue(TKey key) at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) --- End of inner exception stack trace --- at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Lai.Core.Serialization.LaiDataContractSerializer`1.DeserializeJsonJsonDotNet(String contents) \u00a0 ElumTools 2015 Release 9 (2015.9.0.1) Newtonsoft.Json (8.0.0.0) C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\Newtonsoft.Json\\v4.0_8.0.0.0__30ad4fe6b2a6aeed\\Newtonsoft.Json.dll There are a few underlying technical issues at play that cause the conflict, one of which being that the folks at JSON.Net are not versioning/strong-naming their assembly correctly. This issue results in a situation called \u201cDLL hell\u201d when any application installs the JSON.Net assembly into the GAC. \u00a0When Revit is launched, all Addins using JSON.Net are forced to use whatever version of JSON.Net happens to be in the GAC at the time, due to the versioning problem with JSON.net and the design of .NET. One such problematic application is BlueBeam Revu 2016.5. \u00a0In this update, BlueBeam started installing a version of JSON.net into the GAC that is incompatible with ElumTools, thereby creating a conflict between the 2 programs.\u00a0 Workaround: Users experiencing this error should update to ElumTools 2015.11, 2016.8, 2017.4 or later.\u00a0 Status: \n The JSON.net developers have been contacted by Lighting Analysts and confirmed they will not fix the versioning issue with their assembly. \n BlueBeam has been contacted by Lighting Analysts and asked to remove JSON.Net from the GAC. \n This issue has been fixed in versions 2015.11, 2016.8, and 2017.4 by using a custom build of JSON.net with a unique name (Lai.Json.dll). \n ","description":"

FIXED\u00a0in ElumTools 2015.11, 2016.8, 2017.4 and later.


ElumTools uses a popular 3rd party library called JSON.Net. \u00a0In previous versions of ElumTools, this library was known to cause conflicts when other Add-ins using JSON.net were installed alongside ElumTools, as well as an incompatibility with Revit 2017. 2 (17.0.1117.0). \u00a0Such conflicts often resulted in an error like the one below, most commonly when using commands involving calculation points.



Could not deserialize Definition.
\u00a0
Exception:
Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'Lai.Core.CalcPoints.SimpleDefinition, Lai.Core'. Path 'DataObject.$type', line 1, position 98. ---> Newtonsoft.Json.JsonSerializationException: Could not load assembly 'Lai.Core'.
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(TypeNameKey typeNameKey)
at Newtonsoft.Json.Utilities.ThreadSafeStore`2.AddValue(TKey key)
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Lai.Core.Serialization.LaiDataContractSerializer`1.DeserializeJsonJsonDotNet(String contents)
\u00a0
ElumTools 2015 Release 9 (2015.9.0.1)
Newtonsoft.Json (8.0.0.0)
C:\\WINDOWS\\Microsoft.Net\\assembly\\GAC_MSIL\\Newtonsoft.Json\\v4.0_8.0.0.0__30ad4fe6b2a6aeed\\Newtonsoft.Json.dll


There are a few underlying technical issues at play that cause the conflict, one of which being that the folks at JSON.Net are not versioning/strong-naming their assembly correctly.


This issue results in a situation called \u201cDLL hell\u201d when any application installs the JSON.Net assembly into the GAC. \u00a0When Revit is launched, all Addins using JSON.Net are forced to use whatever version of JSON.Net happens to be in the GAC at the time, due to the versioning problem with JSON.net and the design of .NET.


One such problematic application is BlueBeam Revu 2016.5. \u00a0In this update, BlueBeam started installing a version of JSON.net into the GAC that is incompatible with ElumTools, thereby creating a conflict between the 2 programs.\u00a0


Workaround:
Users experiencing this error should update to ElumTools 2015.11, 2016.8, 2017.4 or later.\u00a0


Status:

","folder_id":22000119721,"hits":882,"id":22000169298,"modified_at":"2017-02-21T09:22:19-07:00","modified_by":22001165047,"position":8,"seo_data":{"meta_title":"JSON.Net Incompatibility","meta_description":"ElumTools and Bluebeam can conflict","meta_keywords":"JSON,Revit,ElumTools,Bluebeam"},"status":2,"thumbs_down":3,"thumbs_up":3,"title":"JSON.Net Incompatibility","updated_at":"2017-05-18T21:30:22-06:00","user_id":22001028222,"tags":[{"name":"JSON.NET"},{"name":"BlueBeam"},{"name":"Revit Add-in"}],"folder":{"article_order":1,"category_id":22000076717,"created_at":"2016-12-28T16:19:13-07:00","description":"Known incompatibilities, issues, problems","id":22000119721,"is_default":false,"name":"Known Issues - Legacy Versions","position":17,"updated_at":"2018-12-14T09:50:36-07:00","visibility":1,"customer_folders":[]}}}