Merge pull request #7032 from KevinRansom/vb
Enable VB for dotnet cli 1.1
This commit is contained in:
commit
7d25028834
5 changed files with 39 additions and 8 deletions
|
@ -240,12 +240,6 @@
|
|||
<Copy SourceFiles="@(MSBuildTargetsToCopy)"
|
||||
DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToClean Include="$(StageDirectory)/sdk/**/vbc.exe" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(FilesToClean)" />
|
||||
|
||||
<ItemGroup>
|
||||
<FilesToCopy Include="$(StageDirectory)/**/*" />
|
||||
<PdbsToClean Include="$(StageDirectory)/sdk/**/*.pdb" />
|
||||
|
|
|
@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
6
src/tool_roslyn/RunVbc.cmd
Normal file
6
src/tool_roslyn/RunVbc.cmd
Normal file
|
@ -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" %*
|
17
src/tool_roslyn/RunVbc.sh
Normal file
17
src/tool_roslyn/RunVbc.sh
Normal file
|
@ -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" "$@"
|
|
@ -16,7 +16,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="RunCsc.sh;RunCsc.cmd">
|
||||
<Content Include="RunCsc.sh;RunCsc.cmd;RunVbc.sh;RunVbc.cmd">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
|
@ -33,7 +33,7 @@
|
|||
DestinationFiles="@(HackFilesToCopy->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="MakeCscRunnableAndMoveToPublishDir"
|
||||
<Target Name="MakeCscAndVbcRunnableAndMoveToPublishDir"
|
||||
AfterTargets="Publish"
|
||||
BeforeTargets="RemoveFilesAfterPublish">
|
||||
<ItemGroup>
|
||||
|
@ -55,6 +55,13 @@
|
|||
DestinationFiles="$(PublishDir)/csc.exe;
|
||||
$(PublishDir)/csc.runtimeconfig.json;
|
||||
$(PublishDir)/csc.deps.json;" />
|
||||
|
||||
<Copy SourceFiles="$(PublishDir)/runtimes/any/native/vbc.dll;
|
||||
$(PublishDir)/$(TargetName).runtimeconfig.json;
|
||||
$(PublishDir)/$(TargetName).deps.json;"
|
||||
DestinationFiles="$(PublishDir)/vbc.exe;
|
||||
$(PublishDir)/vbc.runtimeconfig.json;
|
||||
$(PublishDir)/vbc.deps.json;" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RemoveFilesAfterPublish"
|
||||
|
|
Loading…
Add table
Reference in a new issue