File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6+ import * as fs from 'fs' ;
67import * as path from 'path' ;
78import * as protocol from './protocol' ;
89import * as utils from '../common' ;
@@ -305,12 +306,15 @@ export class OmniSharpServer {
305306 ] ;
306307
307308 if ( ! options . razorDisabled ) {
309+ // Razor support only exists for certain platforms, so only load the plugin if present
308310 const razorPluginPath = path . join (
309311 this . extensionPath ,
310312 '.razor' ,
311313 'OmniSharpPlugin' ,
312314 'Microsoft.AspNetCore.Razor.OmniSharpPlugin.dll' ) ;
313- args . push ( '--plugin' , razorPluginPath ) ;
315+ if ( fs . existsSync ( razorPluginPath ) ) {
316+ args . push ( '--plugin' , razorPluginPath ) ;
317+ }
314318 }
315319
316320 if ( options . waitForDebugger === true ) {
You can’t perform that action at this time.
0 commit comments