-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error: Sequence contains no matching element #75
Comments
Hi, thanks for the report. Honestly this json serialization/deserialization is quite bugy from the very beginning. We're thinking to get rid of it. As to your particular case -> try to recompile everything with 1.0.1 version (check other projects references and make rebuild all). If is doesn't help, please drop a project sample here, so we can reproduce the error. Thanks |
I have tried rebuilding my solution with both version 1.0.1 and 1.5.2-beta and I still get that compilation error. Frankly, I don't know the consequences of having a runtime ref to AspectInjector.Broker.dll (netstandard1.0), but more stability sounds nice :-) |
it is just an additional small dll :) no more than that The issue might happen if you have a dll with aspects which is built using 1.0.*-beta. And then you try using those aspects in another project with 1.0.1 release |
Unfortunately, I cannot send you the whole solution and my smaller sample project compiles without problems. |
I could only suggest make CleanAll, manually remove all obj and bin folders. And try again. We will be looking further into this issue. |
Unfortunately, Clean All and removing all obj and bin folders didn't help. |
Should be fixed in https://github.com/pamidur/aspect-injector/releases/tag/2.0.0-beta1 . However beware there are braking changes, you'd need to modify you code code (slightly) |
After upgrading from version 1.0.0-beta4 to version 1.0.1 I get the compilation error below.
I have only one aspect with the following attribute:
[Advice(Advice.Type.Around, Advice.Target.Method)]
26>EXEC : error : System.InvalidOperationException: Sequence contains no matching element
26> at System.Linq.Enumerable.First[TSource](IEnumerable
1 source, Func
2 predicate)26> at AspectInjector.Core.Models.Converters.MethodDefinitionConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
26> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
26> at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
26> at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
26> at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
26> at AspectInjector.Core.Services.AssetsCache.ReadAssetsFromModule(ModuleDefinition module)
26> at AspectInjector.Core.Services.AssetsCache.EnsureCacheLoaded(ModuleDefinition module)
26> at AspectInjector.Core.Services.AssetsCache.GetAssets(ModuleDefinition module)
26> at AspectInjector.Core.Services.AssetsCache.ReadAspect(TypeDefinition type)
26> at AspectInjector.Core.Services.InjectionCollector.ParseInjectionAttribute(ICustomAttributeProvider target, CustomAttribute attr)
26> at AspectInjector.Core.Services.InjectionCollector.ExtractInjections(ICustomAttributeProvider target)
26> at AspectInjector.Core.Services.InjectionCollector.Collect(AssemblyDefinition assembly)
26> at AspectInjector.Core.Processor.ProcessAssembly(AssemblyDefinition assembly)
26> at AspectInjector.Core.Processor.Process(String assemblyFile, IAssemblyResolver resolver)
26> at AspectInjector.Commands.ProcessCommand.Execute(IReadOnlyList`1 args)
26>AspectInjector : error ASI0001: Aspect Injector processing has failed. See other errors.
The text was updated successfully, but these errors were encountered: