This repository was archived by the owner on Apr 20, 2023. It is now read-only.
File tree 5 files changed +39
-8
lines changed
dotnet/commands/dotnet-msbuild
5 files changed +39
-8
lines changed Original file line number Diff line number Diff line change 240
240
<Copy SourceFiles =" @(MSBuildTargetsToCopy)"
241
241
DestinationFiles =" @(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
242
242
243
- <ItemGroup >
244
- <FilesToClean Include =" $(StageDirectory)/sdk/**/vbc.exe" />
245
- </ItemGroup >
246
-
247
- <Delete Files =" @(FilesToClean)" />
248
-
249
243
<ItemGroup >
250
244
<FilesToCopy Include =" $(StageDirectory)/**/*" />
251
245
<PdbsToClean Include =" $(StageDirectory)/sdk/**/*.pdb" />
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public class MSBuildForwardingApp
27
27
{
28
28
{ "MSBuildExtensionsPath" , AppContext . BaseDirectory } ,
29
29
{ "CscToolExe" , GetRunCscPath ( ) } ,
30
+ { "VbcToolExe" , GetRunVbcPath ( ) } ,
30
31
{ "MSBuildSDKsPath" , GetMSBuildSDKsPath ( ) }
31
32
} ;
32
33
@@ -111,5 +112,11 @@ private static string GetRunCscPath()
111
112
var scriptExtension = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? ".cmd" : ".sh" ;
112
113
return Path . Combine ( AppContext . BaseDirectory , "Roslyn" , $ "RunCsc{ scriptExtension } ") ;
113
114
}
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
+ }
114
121
}
115
122
}
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 16
16
</ItemGroup >
17
17
18
18
<ItemGroup >
19
- <Content Include =" RunCsc.sh;RunCsc.cmd" >
19
+ <Content Include =" RunCsc.sh;RunCsc.cmd;RunVbc.sh;RunVbc.cmd " >
20
20
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
21
21
<CopyToPublishDirectory >PreserveNewest</CopyToPublishDirectory >
22
22
</Content >
33
33
DestinationFiles =" @(HackFilesToCopy->'$(PublishDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
34
34
</Target >
35
35
36
- <Target Name =" MakeCscRunnableAndMoveToPublishDir "
36
+ <Target Name =" MakeCscAndVbcRunnableAndMoveToPublishDir "
37
37
AfterTargets =" Publish"
38
38
BeforeTargets =" RemoveFilesAfterPublish" >
39
39
<ItemGroup >
55
55
DestinationFiles =" $(PublishDir)/csc.exe;
56
56
$(PublishDir)/csc.runtimeconfig.json;
57
57
$(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;" />
58
65
</Target >
59
66
60
67
<Target Name =" RemoveFilesAfterPublish"
You can’t perform that action at this time.
0 commit comments