Exemple #1
0
        static AbsoluteDirectoryPath GetVsCodePath()
        {
            var vsCodePath = ApplicationPaths.VsCodePath();

            if (!vsCodePath.HasValue)
            {
                throw new Exception("Failed to find Visual Studio Code path. Is Visual Studio Code installed?");
            }
            return(Platform.OperatingSystem == OS.Windows ?
                   vsCodePath.Value / "bin" / "code.cmd" :
                   vsCodePath.Value / "Contents" / "Resources" / "app" / "bin" / "code");
        }
Exemple #2
0
        public void VsCode_ManualTest()
        {
            var path = ApplicationPaths.VsCodePath();

            if (Platform.OperatingSystem == OS.Windows)
            {
                Assert.AreEqual(@"C:\Program Files\Microsoft VS Code", path.Value.NativePath);
            }
            else
            {
                Assert.AreEqual(@"TODO", path.Value.NativePath);
            }
        }