Skip to content

Commit

Permalink
Add sample library to reproduce export despite missing references
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaffigan committed Nov 14, 2023
1 parent a94d86b commit 47c8c25
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dscom.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dscom.build", "src\dscom.bu
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "assembly4", "src\dscom.demo\assembly4\assembly4.csproj", "{375866D7-1313-408D-AE5A-A77E48711EDB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "assembly5", "src\dscom.demo\assembly5\assembly5.csproj", "{ACECABE4-AD32-4618-889F-E210D9564C8F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -95,6 +97,14 @@ Global
{375866D7-1313-408D-AE5A-A77E48711EDB}.Release|Any CPU.Build.0 = Release|Any CPU
{375866D7-1313-408D-AE5A-A77E48711EDB}.Release|x86.ActiveCfg = Release|x86
{375866D7-1313-408D-AE5A-A77E48711EDB}.Release|x86.Build.0 = Release|x86
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Debug|x86.ActiveCfg = Debug|x86
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Debug|x86.Build.0 = Debug|x86
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Release|Any CPU.Build.0 = Release|Any CPU
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Release|x86.ActiveCfg = Release|x86
{ACECABE4-AD32-4618-889F-E210D9564C8F}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -109,6 +119,7 @@ Global
{5B402A1B-18B1-4D88-804A-BC0E58EF3730} = {0A2E33B4-9DF7-4199-BC39-B0FC9C99FA97}
{F8F68E57-CFFE-4EA5-9C1A-2CD9223B5D85} = {0A2E33B4-9DF7-4199-BC39-B0FC9C99FA97}
{375866D7-1313-408D-AE5A-A77E48711EDB} = {CAAB6257-7EC0-484E-9593-B60CEE8F47D1}
{ACECABE4-AD32-4618-889F-E210D9564C8F} = {CAAB6257-7EC0-484E-9593-B60CEE8F47D1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3F23D9EA-A9D9-4CE5-94B5-050A9B68CA1C}
Expand Down
7 changes: 7 additions & 0 deletions src/dscom.demo/assembly5/ExplodeyBaseClass.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using System.Windows.Controls;

namespace dSPACE.Runtime.InteropServices.DemoAssembly5;

public class ExplodeyBaseClass : UserControl
{
}
9 changes: 9 additions & 0 deletions src/dscom.demo/assembly5/ExplodeyMember.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Windows.Controls;

namespace dSPACE.Runtime.InteropServices.DemoAssembly5;

public class ExplodeyMember
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Example")]
public UserControl Control => null!;
}
13 changes: 13 additions & 0 deletions src/dscom.demo/assembly5/ExplodeyParameter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Windows.Controls;

namespace dSPACE.Runtime.InteropServices.DemoAssembly5;

public class ExplodeyParameter
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "example")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "example")]
public void Example(UserControl thing)
{
// nop
}
}
9 changes: 9 additions & 0 deletions src/dscom.demo/assembly5/IExportableType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Runtime.InteropServices;

namespace dSPACE.Runtime.InteropServices.DemoAssembly5;

[ComVisible(true), Guid("E27C3BDB-ACEF-44F9-8568-481D44681C04"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IExportableType
{
void DoIt();
}
3 changes: 3 additions & 0 deletions src/dscom.demo/assembly5/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using System.Runtime.InteropServices;

[assembly: ComVisible(false)]
25 changes: 25 additions & 0 deletions src/dscom.demo/assembly5/assembly5.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-windows;net48</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>dSPACE.Runtime.InteropServices.DemoAssembly5</RootNamespace>
<AssemblyName>dSPACE.Runtime.InteropServices.DemoAssembly5</AssemblyName>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>Recommended</AnalysisMode>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<Platforms>AnyCPU;x86</Platforms>
<EnableComHosting>true</EnableComHosting>
</PropertyGroup>
<PropertyGroup>
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\dscom\dscom.csproj" />
</ItemGroup>

</Project>

0 comments on commit 47c8c25

Please sign in to comment.