Skip to content

Commit

Permalink
259 error could not load file or assembly presentationframework on tl…
Browse files Browse the repository at this point in the history
…bexport regression in 160 (#260)

* fix: moved namespace check to a later position

* fix: Added code example
reproduces #259  before the bugfix

* chore: fixed code style warning in demo class
  • Loading branch information
SOsterbrink committed Jul 1, 2024
1 parent 60c6b92 commit 34546dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/dscom.demo/assembly5/ExplodeyBaseClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ namespace dSPACE.Runtime.InteropServices.DemoAssembly5;

public class ExplodeyBaseClass : UserControl
{
private sealed class PrivateImplementationDetails
{
// required to reproduce #259
}
}
11 changes: 6 additions & 5 deletions src/dscom/writer/LibraryWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ private void CollectAllTypes()

foreach (var type in types)
{
if (type == null || type.Namespace is null)
{
continue;
}

var comVisibleAttribute = type.GetCustomAttribute<ComVisibleAttribute>();

if (typesAreVisibleForComByDefault && comVisibleAttribute != null && !comVisibleAttribute.Value)
Expand All @@ -114,11 +109,17 @@ private void CollectAllTypes()
continue;
}


if (!type.IsPublic && !type.IsNestedPublic)
{
continue;
}

if (type.Namespace is null)
{
continue;
}

if (type.IsGenericType)
{
continue;
Expand Down

0 comments on commit 34546dd

Please sign in to comment.