Skip to content

Commit 9b8ec71

Browse files
authored
Update to OmniSharp 1.37.0 (#3998)
* Update to OmniSharp 1.37.0 * Set meaning of UseGlobalMono 'auto' to 'never'
1 parent e4ad7da commit 9b8ec71

File tree

7 files changed

+74
-68
lines changed

7 files changed

+74
-68
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139
"updatePackageDependencies"
140140
],
141141
"env": {
142-
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/e709a2e2355f7852a2bb69162931e203/omnisharp-linux-x64-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/a8a83487d32ce93a1652af1bac993c61/omnisharp-linux-x86-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/7fc494bdae565285e50b85a233083fa5/omnisharp-osx-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/93957c055d3fd13a22bfbe1ddbf07e14/omnisharp-win-x64-1.36.1.zip,https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/fb3b05998a1c260de9af6d2458c3d9c8/omnisharp-win-x86-1.36.1.zip",
143-
"NEW_DEPS_VERSION": "1.36.1"
142+
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/aff0374fda57f9071cb63d5005abc950/omnisharp-linux-x64-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/52ae129aa3fbc33e11a40183e625de77/omnisharp-linux-x86-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/5701e95fd6b802c2417e67aa7b9b9c45/omnisharp-osx-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/f685717e82eeb5cded478ac291643898/omnisharp-win-x64-1.37.0.zip,https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/32db11926bcaa92a44cc682d4d156254/omnisharp-win-x86-1.37.0.zip",
143+
"NEW_DEPS_VERSION": "1.37.0"
144144
},
145145
"cwd": "${workspaceFolder}"
146146
}

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
* As an alternative, consider installing the [MSBuild Project Tools](https://marketplace.visualstudio.com/items?itemName=tintoy.msbuild-project-tools) extension by @tintoy.
1010
* Renaming symbol fails within a file that had recently been renamed without saving changes.
1111
* As a workaround, make an edit within the file before using Rename Symbol.
12-
12+
1313
## 1.23.1 (Not yet released)
1414
* Register FixAll commands for disposal ([#3984](https://github.com/OmniSharp/omnisharp-vscode/issues/3984), PR: [#3985](https://github.com/OmniSharp/omnisharp-vscode/pull/3985))
15+
* Include version matched target files with minimal MSBuild (PR: [omnisharp-roslyn#1895](https://github.com/OmniSharp/omnisharp-roslyn/pull/1895))
16+
* Fix lack of trailing italics in quickinfo (PR: [omnisharp-roslyn#1894](https://github.com/OmniSharp/omnisharp-roslyn/pull/1894))
17+
* Set meaning of UseGlobalMono "auto" to "never" until Mono updates their MSBuild (PR: [#3998](https://github.com/OmniSharp/omnisharp-vscode/pull/3998))
1518

1619
## 1.23.0 (August 14, 2020)
1720
* Fix typo in supressBuildAssetsNotification setting name ([#3941](https://github.com/OmniSharp/omnisharp-vscode/issues/3941), PR: [#3942](https://github.com/OmniSharp/omnisharp-vscode/pull/3942))

README.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ The C# extension is powered by [OmniSharp](https://github.com/OmniSharp/omnishar
2222

2323
## Note about using .NET Core 3.1.401 or .NET 5 Preview 8 SDKs on Mono platforms
2424

25-
Because of the new minimum MSBuild version requirement of these new SDKs, it will be necessary to use the Mono packaged with the C# extension. You can set "omnisharp.useGlobalMono" to "never" in the VS Code settings to force the use of the included Mono.
25+
Because of the new minimum MSBuild version requirement of these new SDKs, it will be necessary to use the Mono packaged with the C# extension. The meaning of "omnisharp.useGlobalMono" has change to "never", this forces the use of the included Mono. To use your system
26+
install of Mono set the value to "always" although it may not be compatible with newer SDKs.
2627

2728
## What's new in 1.23.1
2829
- Register FixAll commands for disposal ([#3984](https://github.com/OmniSharp/omnisharp-vscode/issues/3984), PR: [#3985](https://github.com/OmniSharp/omnisharp-vscode/pull/3985))
30+
- Register FixAll commands for disposal ([#3984](https://github.com/OmniSharp/omnisharp-vscode/issues/3984), PR: [#3985](https://github.com/OmniSharp/omnisharp-vscode/pull/3985))
31+
- Include version matched target files with minimal MSBuild (PR: [omnisharp-roslyn#1895](https://github.com/OmniSharp/omnisharp-roslyn/pull/1895))
32+
- Fix lack of trailing italics in quickinfo (PR: [omnisharp-roslyn#1894](https://github.com/OmniSharp/omnisharp-roslyn/pull/1894))
33+
- Set meaning of UseGlobalMono "auto" to "never" until Mono updates their MSBuild (PR: [#3998](https://github.com/OmniSharp/omnisharp-vscode/pull/3998))
2934

3035
## What's new in 1.23.0
3136
- Fix typo in supressBuildAssetsNotification setting name ([#3941](https://github.com/OmniSharp/omnisharp-vscode/issues/3941), PR: [#3942](https://github.com/OmniSharp/omnisharp-vscode/pull/3942))
@@ -40,7 +45,6 @@ Because of the new minimum MSBuild version requirement of these new SDKs, it wil
4045
- Fix all providers support (PR: [#3440](https://github.com/OmniSharp/omnisharp-vscode/pull/3440), PR: [omnisharp-roslyn#1581](https://github.com/OmniSharp/omnisharp-roslyn/pull/1581))
4146
- Fix MSBuild version mismatch with new SDKs ([omnisharp-vscode#3951](https://github.com/OmniSharp/omnisharp-vscode/issues/3951), PR: [#1883](https://github.com/OmniSharp/omnisharp-roslyn/pull/1883))
4247

43-
4448
## What's new in 1.22.2
4549
- Updated Razor support
4650
- Improved Semantic Highlighting support by fixing some scenarios which might lead to thrown exceptions and incorrect results. [dotnet/aspnetcore-tooling#2126](https://github.com/dotnet/aspnetcore-tooling/pull/2126)
@@ -57,29 +61,6 @@ Because of the new minimum MSBuild version requirement of these new SDKs, it wil
5761
- Make "Run/debug tests in context" position a link ([#3915](https://github.com/OmniSharp/omnisharp-vscode/pull/3915))
5862
- Update browser launch regex to support non-default logging frameworks ([#3842](https://github.com/OmniSharp/omnisharp-vscode/pull/3842))
5963

60-
## What's new in 1.22.1
61-
- Added LSP handler for `textDocument/codeAction` request. (PR: [omnisharp-roslyn#1795](https://github.com/OmniSharp/omnisharp-roslyn/pull/1795))
62-
- Expose a custom LSP `omnisharp/client/findReferences` command via code lens (meant to be handled by LSP client). (PR: [#omnisharp-roslyn/1807](https://github.com/OmniSharp/omnisharp-roslyn/pull/1807))
63-
- Added `DirectoryDelete` option to `FileChangeType` allowing clients to report deleted directories that need to be removed (along all the files) from the workspace (PR: [#3829](https://github.com/OmniSharp/omnisharp-vscode/pull/3829), PR: [omnisharp-roslyn#1821](https://github.com/OmniSharp/omnisharp-roslyn/pull/1821))
64-
- Do not crash when plugin assembly cannot be loaded ([omnisharp-roslyn#1307](https://github.com/OmniSharp/omnisharp-roslyn/issues/1307), PR: [omnisharp-roslyn#1827](https://github.com/OmniSharp/omnisharp-roslyn/pull/1827))
65-
- Update browser launch regex to support non-default logging frameworks ([#3842](https://github.com/OmniSharp/omnisharp-vscode/pull/3842))
66-
- Improved support for Codespaces
67-
68-
## What's new in 1.22.0
69-
- Add setting for enabling go to decompilation (PR: [#3774](https://github.com/OmniSharp/omnisharp-vscode/pull/3774))
70-
- Add experimental Semantic Highlighter `csharp.semanticHighlighting.enabled` ([#3565](https://github.com/OmniSharp/omnisharp-vscode/issues/3565), PR: [#3667](https://github.com/OmniSharp/omnisharp-vscode/pull/3667)
71-
- Add commands for Run and Debug Tests in Context (PR: [#3772](https://github.com/OmniSharp/omnisharp-vscode/pull/3772), PR: [omnisharp-roslyn#1782](https://github.com/OmniSharp/omnisharp-roslyn/pull/1782))
72-
- Do not add references CodeLens to Dispose methods ([#3243](https://github.com/OmniSharp/omnisharp-vscode/issues/3243), PR: [#3780](https://github.com/OmniSharp/omnisharp-vscode/pull/3780))
73-
- Add Visual Studio 2019 themes with semantic colors (PR: [#3790](https://github.com/OmniSharp/omnisharp-vscode/pull/3790))
74-
- Added support for `WarningsAsErrors` in csproj files (PR: [omnisharp-roslyn#1779](https://github.com/OmniSharp/omnisharp-roslyn/pull/1779))
75-
- Added support for `WarningsNotAsErrors` in csproj files ([omnisharp-roslyn#1681](https://github.com/OmniSharp/omnisharp-roslyn/issues/1681), PR: [#1784](https://github.com/OmniSharp/omnisharp-roslyn/pull/1784))
76-
- Improved MSBuild scoring system ([omnisharp-roslyn#1783](https://github.com/OmniSharp/omnisharp-roslyn/issues/1783), PR: [omnisharp-roslyn#1797](https://github.com/OmniSharp/omnisharp-roslyn/pull/1797))
77-
- Updated OmniSharp.Extensions.LanguageServer to `0.14.2` to fix synchronisation (PR: [omnisharp-roslyn#1791](https://github.com/OmniSharp/omnisharp-roslyn/pull/1791))
78-
- Add test discovery and NoBuild option to test requests (PR: [omnisharp-roslyn#1719](https://github.com/OmniSharp/omnisharp-roslyn/pull/1719))
79-
- Updated Razor support
80-
- Enable Semantic Highlighting for Razor TagHelpers and Blazor components ([dotnet/aspnetcore#21713](https://github.com/dotnet/aspnetcore/issues/21713))
81-
- Add support for Blazor WebAssembly-specific debug adapter ([dotnet/aspnetcore-tooling#1885](https://github.com/dotnet/aspnetcore-tooling/pull/1885))
82-
8364
### Emmet support in Razor files
8465

8566
To enable emmet support, add the following to your settings.json:

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dotnet"
3131
],
3232
"defaults": {
33-
"omniSharp": "1.36.1",
33+
"omniSharp": "1.37.0",
3434
"razor": "5.0.0-rc.1.20378.7"
3535
},
3636
"main": "./dist/extension",
@@ -162,58 +162,58 @@
162162
{
163163
"id": "OmniSharp",
164164
"description": "OmniSharp for Windows (.NET 4.6 / x86)",
165-
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/fb3b05998a1c260de9af6d2458c3d9c8/omnisharp-win-x86-1.36.1.zip",
166-
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-win-x86-1.36.1.zip",
167-
"installPath": ".omnisharp/1.36.1",
165+
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/32db11926bcaa92a44cc682d4d156254/omnisharp-win-x86-1.37.0.zip",
166+
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-win-x86-1.37.0.zip",
167+
"installPath": ".omnisharp/1.37.0",
168168
"platforms": [
169169
"win32"
170170
],
171171
"architectures": [
172172
"x86"
173173
],
174-
"installTestPath": "./.omnisharp/1.36.1/OmniSharp.exe",
174+
"installTestPath": "./.omnisharp/1.37.0/OmniSharp.exe",
175175
"platformId": "win-x86",
176-
"integrity": "A5EDBE147A3E67EF9F36BCD30CBA2C1A8212E2594569709F06A35F29D8D5C320"
176+
"integrity": "B68B2B28C21BAC05C2A2A5554A3F96A7CA2292BBE8332D0044E6002272427198"
177177
},
178178
{
179179
"id": "OmniSharp",
180180
"description": "OmniSharp for Windows (.NET 4.6 / x64)",
181-
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/93957c055d3fd13a22bfbe1ddbf07e14/omnisharp-win-x64-1.36.1.zip",
182-
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-win-x64-1.36.1.zip",
183-
"installPath": ".omnisharp/1.36.1",
181+
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/f685717e82eeb5cded478ac291643898/omnisharp-win-x64-1.37.0.zip",
182+
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-win-x64-1.37.0.zip",
183+
"installPath": ".omnisharp/1.37.0",
184184
"platforms": [
185185
"win32"
186186
],
187187
"architectures": [
188188
"x86_64"
189189
],
190-
"installTestPath": "./.omnisharp/1.36.1/OmniSharp.exe",
190+
"installTestPath": "./.omnisharp/1.37.0/OmniSharp.exe",
191191
"platformId": "win-x64",
192-
"integrity": "4BC3FF889B54561AE76870E5B2047CA6FF0CD6E5E78882288C7598A882142083"
192+
"integrity": "4505E6DFEAC1EF93318F0371DA2678C04DDB6BE916DEDF1CE95EC7A1CE37561E"
193193
},
194194
{
195195
"id": "OmniSharp",
196196
"description": "OmniSharp for OSX",
197-
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/7fc494bdae565285e50b85a233083fa5/omnisharp-osx-1.36.1.zip",
198-
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-osx-1.36.1.zip",
199-
"installPath": ".omnisharp/1.36.1",
197+
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/5701e95fd6b802c2417e67aa7b9b9c45/omnisharp-osx-1.37.0.zip",
198+
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-osx-1.37.0.zip",
199+
"installPath": ".omnisharp/1.37.0",
200200
"platforms": [
201201
"darwin"
202202
],
203203
"binaries": [
204204
"./mono.osx",
205205
"./run"
206206
],
207-
"installTestPath": "./.omnisharp/1.36.1/run",
207+
"installTestPath": "./.omnisharp/1.37.0/run",
208208
"platformId": "osx",
209-
"integrity": "63D28266188D7F015FB17F16B5E9EB7EF1E211DC022DE0D25E4BA852DF7BB68D"
209+
"integrity": "64761F4D1ACF7C121FB9735C1F5842A4E1845D4782ED390A285436B9F3B6E62F"
210210
},
211211
{
212212
"id": "OmniSharp",
213213
"description": "OmniSharp for Linux (x86)",
214-
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/a8a83487d32ce93a1652af1bac993c61/omnisharp-linux-x86-1.36.1.zip",
215-
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-linux-x86-1.36.1.zip",
216-
"installPath": ".omnisharp/1.36.1",
214+
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/52ae129aa3fbc33e11a40183e625de77/omnisharp-linux-x86-1.37.0.zip",
215+
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-linux-x86-1.37.0.zip",
216+
"installPath": ".omnisharp/1.37.0",
217217
"platforms": [
218218
"linux"
219219
],
@@ -225,16 +225,16 @@
225225
"./mono.linux-x86",
226226
"./run"
227227
],
228-
"installTestPath": "./.omnisharp/1.36.1/run",
228+
"installTestPath": "./.omnisharp/1.37.0/run",
229229
"platformId": "linux-x86",
230-
"integrity": "23470AA972CDB584BF27C4BDF41C6D56A8E886436B444BC5F834F5C8F97AA8D0"
230+
"integrity": "56FA2ABCDA6400D3E45F6D28B9237530CA689944FB7D743187EBCFB47281E4DD"
231231
},
232232
{
233233
"id": "OmniSharp",
234234
"description": "OmniSharp for Linux (x64)",
235-
"url": "https://download.visualstudio.microsoft.com/download/pr/ee1ca529-674e-45c8-b9fd-ead0a47b3d24/e709a2e2355f7852a2bb69162931e203/omnisharp-linux-x64-1.36.1.zip",
236-
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.36.1/omnisharp-linux-x64-1.36.1.zip",
237-
"installPath": ".omnisharp/1.36.1",
235+
"url": "https://download.visualstudio.microsoft.com/download/pr/58378208-fe81-49fb-87a4-7b68012b1444/aff0374fda57f9071cb63d5005abc950/omnisharp-linux-x64-1.37.0.zip",
236+
"fallbackUrl": "https://roslynomnisharp.blob.core.windows.net/releases/1.37.0/omnisharp-linux-x64-1.37.0.zip",
237+
"installPath": ".omnisharp/1.37.0",
238238
"platforms": [
239239
"linux"
240240
],
@@ -245,9 +245,9 @@
245245
"./mono.linux-x86_64",
246246
"./run"
247247
],
248-
"installTestPath": "./.omnisharp/1.36.1/run",
248+
"installTestPath": "./.omnisharp/1.37.0/run",
249249
"platformId": "linux-x64",
250-
"integrity": "07755A44B25E46A9354BE19695DD3465E0C0ECF39DC01706E19A93631E0525A3"
250+
"integrity": "09E9CB207A61972DD7C608999024EF38B4A66E703041C1C013277CAB98A4F8D6"
251251
},
252252
{
253253
"id": "Debugger",
@@ -3476,4 +3476,4 @@
34763476
]
34773477
}
34783478
}
3479-
}
3479+
}

src/omnisharp/OmniSharpMonoResolver.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ export class OmniSharpMonoResolver implements IMonoResolver {
4545

4646
return monoInfo;
4747
}
48-
else if (options.useGlobalMono === "auto" && isValid) {
49-
return monoInfo;
50-
}
48+
49+
// While wwaiting for Mono to ship with a MSBuild version 16.7 or higher, we will treat "auto"
50+
// as "Use included Mono".
51+
52+
// else if (options.useGlobalMono === "auto" && isValid) {
53+
// return monoInfo;
54+
//}
5155

5256
return undefined;
5357
}

test/unitTests/omnisharp/OmniSharpMonoResolver.test.ts

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
2323
const requiredMonoVersion = "6.4.0";
2424
const higherMonoVersion = "6.6.0";
2525

26+
// Sets the meaning of UseGlobalMono "auto". When false, "auto" means "never".
27+
const autoMeansAlways = false;
28+
2629
const getMono = (version: string) => async (env: NodeJS.ProcessEnv) => {
2730
getMonoCalled = true;
2831
environment = env;
@@ -54,7 +57,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
5457
expect(monoInfo).to.be.undefined;
5558
});
5659

57-
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and getGlobalMonoInfo is always`, async () => {
60+
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and useGlobalMono is always`, async () => {
5861
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
5962
let monoInfo = await monoResolver.getGlobalMonoInfo({
6063
...options,
@@ -66,16 +69,21 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
6669
expect(monoInfo.path).to.be.equal(monoPath);
6770
});
6871

69-
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and getGlobalMonoInfo is auto`, async () => {
72+
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and useGlobalMono is auto`, async () => {
7073
let monoResolver = new OmniSharpMonoResolver(getMono(higherMonoVersion));
7174
let monoInfo = await monoResolver.getGlobalMonoInfo({
7275
...options,
7376
useGlobalMono: "auto",
7477
monoPath: monoPath
7578
});
7679

77-
expect(monoInfo.version).to.be.equal(higherMonoVersion);
78-
expect(monoInfo.path).to.be.equal(monoPath);
80+
if (!autoMeansAlways) {
81+
expect(monoInfo).to.be.undefined;
82+
}
83+
else {
84+
expect(monoInfo.version).to.be.equal(higherMonoVersion);
85+
expect(monoInfo.path).to.be.equal(monoPath);
86+
}
7987
});
8088

8189
test(`it throws exception if getGlobalMonoInfo is always and version<${requiredMonoVersion}`, async () => {
@@ -96,20 +104,30 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
96104
monoPath: monoPath
97105
});
98106

99-
expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
100-
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
107+
if (!autoMeansAlways) {
108+
expect(monoInfo).to.be.undefined;
109+
}
110+
else {
111+
expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
112+
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
113+
}
101114
});
102115

103-
test("sets the environment with the monoPath id useGlobalMono is always", async () => {
116+
test("sets the environment with the monoPath id useGlobalMono is auto", async () => {
104117
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
105118
let monoInfo = await monoResolver.getGlobalMonoInfo({
106119
...options,
107120
useGlobalMono: "auto",
108121
monoPath: monoPath
109122
});
110123

111-
expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
112-
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
124+
if (!autoMeansAlways) {
125+
expect(monoInfo).to.be.undefined;
126+
}
127+
else {
128+
expect(monoInfo.env["PATH"]).to.contain(join(monoPath, 'bin'));
129+
expect(monoInfo.env["MONO_GAC_PREFIX"]).to.be.equal(monoPath);
130+
}
113131
});
114132

115133
test("doesn't set the environment with the monoPath if useGlobalMono is never", async () => {

0 commit comments

Comments
 (0)