diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets
index 9f8802765..b38fea623 100644
--- a/build/Microsoft.DotNet.Cli.Compile.targets
+++ b/build/Microsoft.DotNet.Cli.Compile.targets
@@ -240,12 +240,6 @@
-
-
-
-
-
-
diff --git a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs
index 6b2b0f47f..3c74c7193 100644
--- a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs
+++ b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs
@@ -27,6 +27,7 @@ namespace Microsoft.DotNet.Tools.MSBuild
{
{ "MSBuildExtensionsPath", AppContext.BaseDirectory },
{ "CscToolExe", GetRunCscPath() },
+ { "VbcToolExe", GetRunVbcPath() },
{ "MSBuildSDKsPath", GetMSBuildSDKsPath() }
};
@@ -111,5 +112,11 @@ namespace Microsoft.DotNet.Tools.MSBuild
var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ".sh";
return Path.Combine(AppContext.BaseDirectory, "Roslyn", $"RunCsc{scriptExtension}");
}
+
+ private static string GetRunVbcPath()
+ {
+ var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ".sh";
+ return Path.Combine(AppContext.BaseDirectory, "Roslyn", $"RunVbc{scriptExtension}");
+ }
}
}
diff --git a/src/tool_roslyn/RunVbc.cmd b/src/tool_roslyn/RunVbc.cmd
new file mode 100644
index 000000000..e891b1bf5
--- /dev/null
+++ b/src/tool_roslyn/RunVbc.cmd
@@ -0,0 +1,6 @@
+@echo off
+
+REM Copyright (c) .NET Foundation and contributors. All rights reserved.
+REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+"%~dp0..\..\..\dotnet" "%~dp0vbc.exe" %*
diff --git a/src/tool_roslyn/RunVbc.sh b/src/tool_roslyn/RunVbc.sh
new file mode 100644
index 000000000..3dda886a0
--- /dev/null
+++ b/src/tool_roslyn/RunVbc.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) .NET Foundation and contributors. All rights reserved.
+# Licensed under the MIT license. See LICENSE file in the project root for full license information.
+#
+
+set -e
+
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
+done
+DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+
+"$DIR/../../../dotnet" "$DIR/vbc.exe" "$@"
diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj
index f040f15c5..4bed7fe7b 100644
--- a/src/tool_roslyn/tool_roslyn.csproj
+++ b/src/tool_roslyn/tool_roslyn.csproj
@@ -16,7 +16,7 @@
-
+
PreserveNewest
PreserveNewest
@@ -33,7 +33,7 @@
DestinationFiles="@(HackFilesToCopy->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
-
@@ -55,6 +55,13 @@
DestinationFiles="$(PublishDir)/csc.exe;
$(PublishDir)/csc.runtimeconfig.json;
$(PublishDir)/csc.deps.json;" />
+
+