You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.
Our code library contains the same code across projects, but there are two project libraries loaded, one for .NET 4 and one for .NET 4.5. There are some issues with this when sharpDox loads the solution:
The type list contains two copies of the same classes with no way to distinguish them
Excluding one class (e.g. the one from .NET 4.0) excludes it from .NET 4.5 also, once the exclusion list is reloaded
Building the documentation with both loaded gives me the following error:
Starting step: "Parsing project file"
Starting step: "Parsing code"
Could not build documentation.
System.InvalidOperationException: Sequence contains more than one element
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at SharpDox.Build.Roslyn.Parser.ProjectParser.MethodCallParser.ParseMethodCalls()
at SharpDox.Build.Roslyn.RoslynParser.ParseMethodCalls(ParserOptions parserOptions)
at SharpDox.Build.Roslyn.RoslynParser.GetParsedSolution(String solutionFile, ICoreConfigSection sharpDoxConfig, Dictionary`2 tokens, Boolean parseMethodCalls, Boolean ignoreExcludes)
at SharpDox.Build.Context.Step.ParseCodeStep.RunStep(SDProject sdProject)
at SharpDox.Build.Context.BuildContext.StartBuild()
Here is a sample of the structure we have:
MyLibrary-net4
MyClass
MyMethod()
MyLibrary-net45
MyClass
MyMethod()
Since you are only using fully qualified method names as "unique names", if two projects are loaded with the same code, it will fail, because that .Single(...) call inside of ParseMethodCalls() is expecting one result, but instead it finds two identical ones:
MyLibrary.MyClass.MyMethod() [net4]
MyLibrary.MyClass.MyMethod() [net45]
I think the fix here is to prepend the Framework version to the exclusion/inclusion list, or at the very least, prepend the project name (project names are guaranteed to be unique within a solution IIRC).
The workaround was to create another solution with only one set of projects in it, so that code was not duplicated. Not ideal, though - I would like to use my main solution instead.
The text was updated successfully, but these errors were encountered:
Our code library contains the same code across projects, but there are two project libraries loaded, one for .NET 4 and one for .NET 4.5. There are some issues with this when sharpDox loads the solution:
Here is a sample of the structure we have:
Since you are only using fully qualified method names as "unique names", if two projects are loaded with the same code, it will fail, because that
.Single(...)
call inside ofParseMethodCalls()
is expecting one result, but instead it finds two identical ones:MyLibrary.MyClass.MyMethod()
[net4]MyLibrary.MyClass.MyMethod()
[net45]I think the fix here is to prepend the Framework version to the exclusion/inclusion list, or at the very least, prepend the project name (project names are guaranteed to be unique within a solution IIRC).
The workaround was to create another solution with only one set of projects in it, so that code was not duplicated. Not ideal, though - I would like to use my main solution instead.
The text was updated successfully, but these errors were encountered: