The Microsoft Visual C# Interactive Compiler (CSI.exe) allows to execute C# Script files from the commandline or to enter C# Scripts interactively.
Questions tagged [csi]
37 questions
15
votes
2 answers
How to use CSI.exe script argument
When you run csi.exe /? (with Visual Studio 2015 update 2 installed), you will get the following syntax
Microsoft (R) Visual C# Interactive Compiler version 1.2.0.51106
Copyright (C) Microsoft Corporation. All rights reserved.
Usage: csi [option]…

jyao
- 1,550
- 3
- 19
- 26
11
votes
2 answers
How to set C# version for csi.exe
In C# interactive (as part of Visual Studio 2019 or standalone) I'd like to code something like this using C#:
var s = "abcdef";
var s1 = s[2..4];
This gives the following message:
(1,12): error CS0518: Predefined type 'System.Range' is not…

Taisbak
- 107
- 5
8
votes
4 answers
I need a CSharp script (.csx) runner, like csi.exe, for a build agent machine
I'm writing .csx build scripts. On my local machine I run them with CSharp interactive from visual studio or via C:\Program Files (x86)\MSBuild\14.0\bin\csi.exe. I've tried running .csx scripts on a TeamCity build agent machine (agent machines…

Ivan Koshelev
- 3,830
- 2
- 30
- 50
8
votes
3 answers
How to access command line arguments in .csx script?
I'm using csi.exe the C# Interactive Compiler to run a .csx script. How can I access any command line arguments supplied to my script?
csi script.csx 2000
If you're not familiar with csi.exe, here's the usage message:
>csi /?
Microsoft (R) Visual…

Colonel Panic
- 132,665
- 89
- 401
- 465
5
votes
3 answers
C# Interactive Location
I use F# Interactive every day, so I like launching it from cmd, not just Visual Studio and Visual Studio Code. To do that, I have an environment variable called FSHARPINSTALLDIR in my PATH that points to C:\Program Files (x86)\Microsoft Visual…

Brett Rowberry
- 1,030
- 8
- 21
4
votes
1 answer
Enable featuregate EKS via eksctl
I want to enable feature gate in EKS Cluster because I want to use io2 PVC. I am following this document. https://github.com/kubernetes-sigs/aws-ebs-csi-driver and it says the following. However, in eksctl I cannot see any option to create a node…

Matt
- 99
- 1
- 9
3
votes
1 answer
Minimun privileges for CSI sidecar
I'm building my own CSI driver with CSI standards and I'm wondering about the Security Context to be set for the CSI sidecar containers.
I'm going to use:
Node Driver Registrar
CSI provisioner
CSI attacher
CSI liveness probe.
Some of them need to…

Anto74
- 33
- 3
3
votes
0 answers
How can I use Ctrl-K, Ctrl-Enter to send code to the C# Interactive window?
TL;DR: how can I send a selection from the C# editor to the C# Interactive window?
The C# Interactive help screen (after typing #help) shows a bunch of keyboard shortcuts, among which:
Ctrl-K, Ctrl-Enter Paste the selection at the end of…

Abel
- 56,041
- 24
- 146
- 247
2
votes
2 answers
use preexisting volume to deployment in kubernetes
I'm trying to add preexisting volume to one of my deployment to use persistent data to jenkins. I'm using hetzner cloud as cloud provider and also using sci drivers to point the preexisting volume. But I'm getting below error,
this is my volume.yml…

Hasitha Chandula
- 425
- 4
- 12
2
votes
2 answers
Secret is not creating in AKS after fetching it with CSI Driver
By using the reference of https://learn.microsoft.com/en-us/azure/aks/csi-secrets-store-nginx-tls this document, I'm trying to fetch the TLS secrets from AKV to AKS pods.
Initially I created and configured CSI driver configuration with using User…

Kaivalya Dambalkar
- 83
- 2
- 14
2
votes
1 answer
WPF in C# interactive (csi.exe)
I've started to play with c# interactive. In Visual Studio I was able to create some window with following code:
#r "PresentationFramework"
using System.Windows;
var w = new Window();
w.Show();
However due to this error using csi.exe I had to do…

Paweł Audionysos
- 576
- 5
- 17
2
votes
1 answer
How to get the path to the .csx script being executed?
When executing a C# script (.csx) with C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\csi.exe, how do I get the path to the script being executed?
The line
Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory);
prints the path to the…

chtenb
- 14,924
- 14
- 78
- 116
2
votes
1 answer
How to set platform architecture for csi.exe
I see the following error when running csi.exe:
System.BadImageFormatException: Could not load file or assembly
'xyz.dll' or one of its dependencies. is not a valid Win32
application. (Exception from HRESULT: 0x800700C1)
Compiling in Visual…

aleksander_si
- 1,021
- 10
- 28
2
votes
2 answers
How to create csx file in Visual Studio?
I'm using Visual Studio 2015 Update 2. According to csi.exe there are such things as 'C# script files':
Executes script-file.csx if specified
Is there are documentation for this format? How can I create them in Visual Studio?
> csi.exe…

Colonel Panic
- 132,665
- 89
- 401
- 465
1
vote
0 answers
Kubernetes CSI Driver: Mounting of volumes when pods run on different nodes
I am currently using the Hetzner CSI-Driver (https://github.com/hetznercloud/csi-driver) in Kubernetes, which works fine for the most part.
But sometimes I run into the issue that two pods using the same persistentVolumeClaim get scheduled onto…

Juliette
- 966
- 16
- 35