Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,13 @@ foreach ($projectFile in $projectFilesList) {

# Prepare target language server folders in the vscode extension bin folder
$darwinBinPath = ".\vscode-extension\bin\netcore\darwin"
$darwinArm64BinPath = ".\vscode-extension\bin\netcore\darwin-arm64"
$winBinPath = ".\vscode-extension\bin\netcore\win32"
$linuxBinPath = ".\vscode-extension\bin\netcore\linux"
$netframeworkBinPath = ".\vscode-extension\bin\netframeworknav2018"

Clear-Folder -Path $darwinBinPath
Clear-Folder -Path $darwinArm64BinPath
Clear-Folder -Path $winBinPath
Clear-Folder -Path $linuxBinPath
Clear-Folder -Path $netframeworkBinPath
Expand All @@ -236,6 +238,10 @@ dotnet publish ".\AZALDevToolsServer.NetCore\AZALDevToolsServer.NetCore.csproj"
Write-Host "Building MacOS .net core language server"
dotnet publish ".\AZALDevToolsServer.NetCore\AZALDevToolsServer.NetCore.csproj" -r osx-x64 -f net10.0 -o "..\vscode-extension\bin\netcore\darwin" --self-contained true --configuration Release

# MacOS Apple Silicon - .net core
Write-Host "Building MacOS Apple Silicon .net core language server"
dotnet publish ".\AZALDevToolsServer.NetCore\AZALDevToolsServer.NetCore.csproj" -r osx-arm64 -f net10.0 -o "..\vscode-extension\bin\netcore\darwin-arm64" --self-contained true --configuration Release

# Linux - .net core
Write-Host "Building Linux .net core language server"
dotnet publish ".\AZALDevToolsServer.NetCore\AZALDevToolsServer.NetCore.csproj" -r linux-x64 -f net10.0 -o "..\vscode-extension\bin\netcore\linux" --self-contained true --configuration Release
Expand Down
6 changes: 4 additions & 2 deletions vscode-extension/src/langserver/toolsLangServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ export class ToolsLangServerClient implements vscode.Disposable {
langServerPath = this._context.asAbsolutePath("bin/netframeworknav2018/AZALDevToolsServer.NetFrameworkNav2018.exe");
this.errorLogUri = vscode.Uri.file(this._context.asAbsolutePath("bin/netframeworknav2018/log.txt"));
} else {
langServerPath = this._context.asAbsolutePath("bin/netcore/" + platform + "/AZALDevToolsServer.NetCore");
this.errorLogUri = vscode.Uri.file(this._context.asAbsolutePath("bin/netcore/" + platform + "/log.txt"));
//use native Apple Silicon binaries when VS Code runs as arm64 process
let binFolder = ((platform === "darwin") && (os.arch() === "arm64")) ? "darwin-arm64" : platform;
langServerPath = this._context.asAbsolutePath("bin/netcore/" + binFolder + "/AZALDevToolsServer.NetCore");
this.errorLogUri = vscode.Uri.file(this._context.asAbsolutePath("bin/netcore/" + binFolder + "/log.txt"));
if ((platform === "darwin") || (platform === "linux")) {
let fs = require('fs');
fs.chmodSync(langServerPath, 0o755);
Expand Down