@@ -121,6 +121,32 @@ export async function activate(context: vscode.ExtensionContext): Promise<CSharp
121121 eventStream . post ( new ActivationFailure ( ) ) ;
122122 }
123123
124+ if ( ! isSupportedPlatform ( platformInfo ) ) {
125+ const platform : string = platformInfo . platform ? platformInfo . platform : "this platform" ;
126+ const architecture : string = platformInfo . architecture ? platformInfo . architecture : " and <unknown processor architecture>" ;
127+ let errorMessage : string = `The C# extension for Visual Studio Code (powered by OmniSharp) is incompatiable on ${ platform } ${ architecture } ` ;
128+ const messageOptions : vscode . MessageOptions = {
129+ } ;
130+
131+ // Check to see if VS Code is running remotely
132+ if ( extension . extensionKind === vscode . ExtensionKind . Workspace ) {
133+ const setupButton : string = "How to setup Remote Debugging" ;
134+ errorMessage += ` with the VS Code Remote Extensions. To see avaliable workarounds, click on '${ setupButton } '.` ;
135+
136+ await vscode . window . showErrorMessage ( errorMessage , messageOptions , setupButton ) . then ( ( selectedItem : string ) => {
137+ if ( selectedItem === setupButton ) {
138+ let remoteDebugInfoURL = 'https://github.com/OmniSharp/omnisharp-vscode/wiki/Remote-Debugging-On-Linux-Arm' ;
139+ vscode . env . openExternal ( vscode . Uri . parse ( remoteDebugInfoURL ) ) ;
140+ }
141+ } ) ;
142+ } else {
143+ await vscode . window . showErrorMessage ( errorMessage , messageOptions ) ;
144+ }
145+
146+ // Unsupported platform
147+ return null ;
148+ }
149+
124150 let telemetryObserver = new TelemetryObserver ( platformInfo , ( ) => reporter ) ;
125151 eventStream . subscribe ( telemetryObserver . post ) ;
126152
@@ -171,6 +197,24 @@ export async function activate(context: vscode.ExtensionContext): Promise<CSharp
171197 } ;
172198}
173199
200+ function isSupportedPlatform ( platform : PlatformInformation ) : boolean {
201+ if ( platform . isWindows ( ) ) {
202+ return platform . architecture === "x86" || platform . architecture === "x86_64" ;
203+ }
204+
205+ if ( platform . isMacOS ( ) ) {
206+ return true ;
207+ }
208+
209+ if ( platform . isLinux ( ) ) {
210+ return platform . architecture === "x86_64" ||
211+ platform . architecture === "x86" ||
212+ platform . architecture === "i686" ;
213+ }
214+
215+ return false ;
216+ }
217+
174218async function ensureRuntimeDependencies ( extension : vscode . Extension < CSharpExtensionExports > , eventStream : EventStream , platformInfo : PlatformInformation , installDependencies : IInstallDependencies ) : Promise < boolean > {
175219 return installRuntimeDependencies ( extension . packageJSON , extension . extensionPath , installDependencies , eventStream , platformInfo ) ;
176220}
0 commit comments