Skip to content

Commit

Permalink
fix: Update CreateCompilationFromVBCode default name
Browse files Browse the repository at this point in the history
  • Loading branch information
yufeih committed Dec 16, 2022
1 parent c83fd5e commit 4dd4033
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public static Compilation CreateCompilationFromCsharpCode(string code, string na
}
}

public static Compilation CreateCompilationFromVBCode(string code, string name = "cs.temp.dll", params MetadataReference[] references)
public static Compilation CreateCompilationFromVBCode(string code, string name = "vb.temp.dll", params MetadataReference[] references)
{
try
{
var tree = VB.SyntaxFactory.ParseSyntaxTree(code);
return VB.VisualBasicCompilation.Create(
"vb.temp.dll",
name,
options: new VB.VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary),
syntaxTrees: new[] { tree },
references: GetNetFrameworkMetadataReferences().Concat(references));
Expand Down

0 comments on commit 4dd4033

Please sign in to comment.