@@ -9,19 +9,20 @@ internal class Assembly : Extraction.Entities.Location
9
9
10
10
private readonly string assemblyPath ;
11
11
private readonly IAssemblySymbol assembly ;
12
+ private readonly bool isOutputAssembly ;
12
13
13
14
private Assembly ( Context cx , Microsoft . CodeAnalysis . Location ? init )
14
15
: base ( cx , init )
15
16
{
16
- if ( init is null )
17
+ isOutputAssembly = init is null ;
18
+ if ( isOutputAssembly )
17
19
{
18
- // This is the output assembly
19
20
assemblyPath = cx . Extractor . OutputPath ;
20
21
assembly = cx . Compilation . Assembly ;
21
22
}
22
23
else
23
24
{
24
- assembly = init . MetadataModule ! . ContainingAssembly ;
25
+ assembly = init ! . MetadataModule ! . ContainingAssembly ;
25
26
var identity = assembly . Identity ;
26
27
var idString = identity . Name + " " + identity . Version ;
27
28
assemblyPath = cx . Extractor . GetAssemblyFile ( idString ) ;
@@ -68,8 +69,16 @@ public static Assembly CreateOutputAssembly(Context cx)
68
69
69
70
public override void WriteId ( EscapingTextWriter trapFile )
70
71
{
71
- trapFile . Write ( assembly . ToString ( ) ) ;
72
- if ( ! ( assemblyPath is null ) )
72
+ if ( isOutputAssembly && Context . Extractor . Mode . HasFlag ( ExtractorMode . Standalone ) )
73
+ {
74
+ trapFile . Write ( "buildlessOutputAssembly" ) ;
75
+ }
76
+ else
77
+ {
78
+ trapFile . Write ( assembly . ToString ( ) ) ;
79
+ }
80
+
81
+ if ( assemblyPath is not null )
73
82
{
74
83
trapFile . Write ( "#file:///" ) ;
75
84
trapFile . Write ( assemblyPath . Replace ( "\\ " , "/" ) ) ;
0 commit comments