Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit537af43

Browse files
brettfoKevinRansom
authored andcommitted
use csc from a NuGet package (#4023)
1 parent010c0b8 commit537af43

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

‎tests/fsharp/packages.config‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<packageid="Microsoft.Net.Compilers"version="2.4.0" />
34
<packageid="NUnit3TestAdapter"version="3.7.0"targetFramework="net45" />
45
<packageid="runtime.win-x64.Microsoft.NETCore.ILDAsm"version="2.0.3" />
56
<packageid="runtime.win-x86.Microsoft.NETCore.ILDAsm"version="2.0.3" />

‎tests/fsharp/test-framework.fs‎

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ module Commands =
105105

106106
typeTestConfig=
107107
{ EnvironmentVariables:Map<string, string>
108-
CORDIR:string
109108
CSC:string
110109
csc_flags:string
111110
BUILD_CONFIG:string
@@ -131,25 +130,6 @@ module WindowsPlatform =
131130
[|"PROCESSOR_ARCHITECTURE"|]|> Seq.tryPick(fun s-> find s)|>function None->""| Some x-> x
132131
value="AMD64"
133132

134-
letclrPath envVars=
135-
136-
letwindir=
137-
match envVars|> Map.tryFind"windir"with
138-
| Some x-> x
139-
| None-> failwithf"environment variable '%s' required""WINDIR"
140-
141-
let mutableCORDIR=
142-
match Directory.EnumerateDirectories(windir++"Microsoft.NET"++"Framework","v4.0.?????")|> List.ofSeq|> List.revwith
143-
| x::_-> x
144-
|[]-> failwith"couldn't determine CORDIR"
145-
146-
// == Use the same runtime as our architecture
147-
// == ASSUMPTION: This could be a good or bad thing.
148-
if Is64BitOperatingSystem envVarsthen
149-
CORDIR<- CORDIR.Replace("Framework","Framework64")
150-
151-
CORDIR
152-
153133
typeFSLibPaths=
154134
{ FSCOREDLLPATH:string}
155135

@@ -164,10 +144,9 @@ let config configurationName envVars =
164144
letcsc_flags="/nologo"
165145
letfsc_flags="-r:System.Core.dll --nowarn:20 --define:COMPILED"
166146
letfsi_flags="-r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror"
167-
letCORDIR= WindowsPlatform.clrPath envVars
168147
letIs64BitOperatingSystem= WindowsPlatform.Is64BitOperatingSystem envVars
169148
letarchitectureMoniker=if Is64BitOperatingSystemthen"x64"else"x86"
170-
letCSC= requireFile(CORDIR++"csc.exe")
149+
letCSC= requireFile(packagesDir++"Microsoft.Net.Compilers.2.4.0"++"tools"++"csc.exe")
171150
letILDASM= requireFile(packagesDir++("runtime.win-"+ architectureMoniker+".Microsoft.NETCore.ILDAsm.2.0.3")++"runtimes"++("win-"+ architectureMoniker)++"native"++"ildasm.exe")
172151
letcoreclrdll= requireFile(packagesDir++("runtime.win-"+ architectureMoniker+".Microsoft.NETCore.Runtime.CoreCLR.2.0.3")++"runtimes"++("win-"+ architectureMoniker)++"native"++"coreclr.dll")
173152
letPEVERIFY= requireFile(SCRIPT_ROOT++".."++"fsharpqa"++"testenv"++"src"++"PEVerify"++"bin"++ configurationName++"net46"++"PEVerify.exe")
@@ -204,7 +183,6 @@ let config configurationName envVars =
204183
|false->"win7-x86"
205184

206185
{ EnvironmentVariables= envVars
207-
CORDIR= CORDIR|> Commands.pathAddBackslash
208186
FSCBinPath= FSCBinPath|> Commands.pathAddBackslash
209187
FSCOREDLLPATH= FSCOREDLLPATH
210188
ILDASM= ILDASM
@@ -225,7 +203,6 @@ let logConfig (cfg: TestConfig) =
225203
log"---------------------------------------------------------------"
226204
log"Executables"
227205
log""
228-
log"CORDIR =%s" cfg.CORDIR
229206
log"CSC =%s" cfg.CSC
230207
log"BUILD_CONFIG =%s" cfg.BUILD_CONFIG
231208
log"csc_flags =%s" cfg.csc_flags

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp