This repository was archived by the owner on Apr 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +39
-8
lines changed
dotnet/commands/dotnet-msbuild Expand file tree Collapse file tree 5 files changed +39
-8
lines changed Original file line number Diff line number Diff line change 240240 <Copy SourceFiles =" @(MSBuildTargetsToCopy)"
241241 DestinationFiles =" @(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
242242
243- <ItemGroup >
244- <FilesToClean Include =" $(StageDirectory)/sdk/**/vbc.exe" />
245- </ItemGroup >
246-
247- <Delete Files =" @(FilesToClean)" />
248-
249243 <ItemGroup >
250244 <FilesToCopy Include =" $(StageDirectory)/**/*" />
251245 <PdbsToClean Include =" $(StageDirectory)/sdk/**/*.pdb" />
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public class MSBuildForwardingApp
2727 {
2828 { "MSBuildExtensionsPath" , AppContext . BaseDirectory } ,
2929 { "CscToolExe" , GetRunCscPath ( ) } ,
30+ { "VbcToolExe" , GetRunVbcPath ( ) } ,
3031 { "MSBuildSDKsPath" , GetMSBuildSDKsPath ( ) }
3132 } ;
3233
@@ -111,5 +112,11 @@ private static string GetRunCscPath()
111112 var scriptExtension = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? ".cmd" : ".sh" ;
112113 return Path . Combine ( AppContext . BaseDirectory , "Roslyn" , $ "RunCsc{ scriptExtension } ") ;
113114 }
115+
116+ private static string GetRunVbcPath ( )
117+ {
118+ var scriptExtension = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? ".cmd" : ".sh" ;
119+ return Path . Combine ( AppContext . BaseDirectory , "Roslyn" , $ "RunVbc{ scriptExtension } ") ;
120+ }
114121 }
115122}
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ REM Copyright (c) .NET Foundation and contributors. All rights reserved.
4+ REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
5+
6+ " %~dp0 ..\..\..\dotnet" " %~dp0 vbc.exe" %*
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Copyright (c) .NET Foundation and contributors. All rights reserved.
4+ # Licensed under the MIT license. See LICENSE file in the project root for full license information.
5+ #
6+
7+ set -e
8+
9+ SOURCE=" ${BASH_SOURCE[0]} "
10+ while [ -h " $SOURCE " ]; do # resolve $SOURCE until the file is no longer a symlink
11+ DIR=" $( cd -P " $( dirname " $SOURCE " ) " && pwd ) "
12+ SOURCE=" $( readlink " $SOURCE " ) "
13+ [[ " $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
14+ done
15+ DIR=" $( cd -P " $( dirname " $SOURCE " ) " && pwd ) "
16+
17+ " $DIR /../../../dotnet" " $DIR /vbc.exe" " $@ "
Original file line number Diff line number Diff line change 1616 </ItemGroup >
1717
1818 <ItemGroup >
19- <Content Include =" RunCsc.sh;RunCsc.cmd" >
19+ <Content Include =" RunCsc.sh;RunCsc.cmd;RunVbc.sh;RunVbc.cmd " >
2020 <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
2121 <CopyToPublishDirectory >PreserveNewest</CopyToPublishDirectory >
2222 </Content >
3333 DestinationFiles =" @(HackFilesToCopy->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
3434 </Target >
3535
36- <Target Name =" MakeCscRunnableAndMoveToPublishDir "
36+ <Target Name =" MakeCscAndVbcRunnableAndMoveToPublishDir "
3737 AfterTargets =" Publish"
3838 BeforeTargets =" RemoveFilesAfterPublish" >
3939 <ItemGroup >
5555 DestinationFiles =" $(PublishDir)/csc.exe;
5656 $(PublishDir)/csc.runtimeconfig.json;
5757 $(PublishDir)/csc.deps.json;" />
58+
59+ <Copy SourceFiles =" $(PublishDir)/runtimes/any/native/vbc.dll;
60+ $(PublishDir)/$(TargetName).runtimeconfig.json;
61+ $(PublishDir)/$(TargetName).deps.json;"
62+ DestinationFiles =" $(PublishDir)/vbc.exe;
63+ $(PublishDir)/vbc.runtimeconfig.json;
64+ $(PublishDir)/vbc.deps.json;" />
5865 </Target >
5966
6067 <Target Name =" RemoveFilesAfterPublish"
You can’t perform that action at this time.
0 commit comments