Open charbull opened 7 years ago
Could you please shed some more light on this? In general, indeed RomanticWeb creates statements with foaf:primaryTopic predicate in a special purpose meta-graph. It's used to limit triples to download from an underlying data store to those related to some resources described in some graphs. If that's the case, it works as intended.
umm I think I am having strange behavior maybe didn't install it correctly due to the dependencies version or something else?
I tried to follow the Sample example here: https://github.com/MakoLab/RomanticWeb.Sample
1- FodyWeavers.xml with RomanticWeb nuget 1.0.0-rc1 <?xml version="1.0" encoding="utf-8" ?>
Severity Code Description Project File Line Suppression State Error Fody: Could not find a weaver named 'RomanticWeb'. If you have nuget package restore turned on you probably need to do a build to download the weavers. Alternatively you may have added a weaver to your 'FodyWeavers.xml' and forgot to add the appropriate NuGet package. Perhaps you need to run 'Install-Package RomanticWeb.Fody'. This url may provide more information http://nuget.org/packages/RomanticWeb.Fody/ . RomanticWebExample.
==> I have to remove the line with
2- In line 47 of https://github.com/MakoLab/RomanticWeb.Sample/blob/master/Program.cs, there is ICollection
I keep having: System.InvalidCastException occurred HResult=0x80004002 Message=Unable to cast object of type 'System.Collections.ObjectModel.Collection`1[ConsoleApplication4.IPublication]' to type 'RomanticWeb.Entities.IEntity'.
==> It seems that the Publications is always null in the debugger. If I replaced ICollection with IList or another similar data structure the same problem occurs. The properties Name and LastName are not null. Maybe something related to Fody configuration?
did I miss some configuration or dependency somewhere? I uploaded my tests here: https://github.com/charbull/RomanticWebExample (with dependencies and nuget packages, I know I should not push them there but helps in reproducing my errors?)
Regards,
Hmm. I can see that you're giving a try version 1.0 RC which is the one that should work for both .net framework 4.5 and .net Core. In general, Fody shouldn't be used here. I left it for compatibility, but in fact I've moved logic Fody weaver did during build time to some extra code executed in runtime. This was due to fact that the time I was writing .net core version there was no Fody version I could use. I'd start with getting rid of Fody nuget - it should work.
Hello,
I got rid of RomanticWebFody and Fody, but still getting error
on the tim.Friends.Add(joe);
System.NullReferenceException occurred
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=ConsoleApplication4
StackTrace:
at ConsoleApplication4.Program.Main(String[] args) in C:\Users\SESA232537\Source\Repos\RomanticWebExample\ConsoleApplication4\Program.cs:line 43
The http://xmlns.com/foaf/0.1/primaryTopic is generated by default on every class annotation.
[Class("http://se.com#Person")] public interface IPerson : IEntity