Skip to content

Commit 34546dd

Browse files
authored
259 error could not load file or assembly presentationframework on tlbexport 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
1 parent 60c6b92 commit 34546dd

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/dscom.demo/assembly5/ExplodeyBaseClass.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ namespace dSPACE.Runtime.InteropServices.DemoAssembly5;
44

55
public class ExplodeyBaseClass : UserControl
66
{
7+
private sealed class PrivateImplementationDetails
8+
{
9+
// required to reproduce #259
10+
}
711
}

src/dscom/writer/LibraryWriter.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ private void CollectAllTypes()
9797

9898
foreach (var type in types)
9999
{
100-
if (type == null || type.Namespace is null)
101-
{
102-
continue;
103-
}
104-
105100
var comVisibleAttribute = type.GetCustomAttribute<ComVisibleAttribute>();
106101

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

112+
117113
if (!type.IsPublic && !type.IsNestedPublic)
118114
{
119115
continue;
120116
}
121117

118+
if (type.Namespace is null)
119+
{
120+
continue;
121+
}
122+
122123
if (type.IsGenericType)
123124
{
124125
continue;

0 commit comments

Comments
 (0)