Skip to content

Instantly share code, notes, and snippets.

@jsm222
Created December 1, 2022 22:01
Show Gist options
  • Save jsm222/f9e376f68be552ad11e292663f91764b to your computer and use it in GitHub Desktop.
Save jsm222/f9e376f68be552ad11e292663f91764b to your computer and use it in GitHub Desktop.
diff --git a/NuGet.Config b/NuGet.Config
index 4d92b5c1..7302737f 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -2,12 +2,13 @@
<configuration>
<packageSources>
<clear />
- <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
+ <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="darc-pub-DotNet-msbuild-Trusted-a02f736" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-a02f7365/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
<add key="OmniSharp" value="https://www.myget.org/F/omnisharp/api/v3/index.json" />
+ <add key="local" value="/var/cache/nuget" />
</packageSources>
</configuration>
diff --git a/build.cake b/build.cake
index 6b08124a..b07d55da 100644
--- a/build.cake
+++ b/build.cake
@@ -13,8 +13,7 @@ using System.Xml;
// Arguments
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Debug");
-var installFolder = Argument("install-path",
- CombinePaths(Environment.GetEnvironmentVariable(Platform.Current.IsWindows ? "USERPROFILE" : "HOME"), ".omnisharp"));
+var installFolder = Argument("install-path","/home/jesper/.omisharp");
var publishAll = HasArgument("publish-all");
var useGlobalDotNetSdk = HasArgument("use-global-dotnet-sdk");
var testProjectArgument = Argument("test-project", "");
diff --git a/global.json b/global.json
index 0e4bf1e9..e7c3811a 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "7.0.100-rc.1.22431.12",
+ "version": "7.0",
"rollForward": "patch"
}
}
diff --git a/scripts/platform.cake b/scripts/platform.cake
index 31e1ef8d..72750aa7 100644
--- a/scripts/platform.cake
+++ b/scripts/platform.cake
@@ -11,7 +11,7 @@ public sealed class Platform
public Version Version { get; }
public string DistroName { get; }
- public bool IsWindows => _os == "Windows";
+ public bool IsWindows => _os == "Windows";
public bool IsMacOS => _os == "MacOS";
public bool IsLinux => _os == "Linux";
@@ -21,7 +21,7 @@ public sealed class Platform
private Platform(string os, string architecture, Version version, string distroName = null)
{
- _os = os;
+ _os = "freebsd";
_architecture = architecture;
this.Version = version;
this.DistroName = distroName;
@@ -85,22 +85,11 @@ public sealed class Platform
}
}
- switch (os)
- {
- case "Windows":
- return new Platform(os, architecture, Environment.OSVersion.Version);
- case "MacOS":
- var versionText = RunAndCaptureOutput("sw_vers", "-productVersion");
- return new Platform(os, architecture, new Version(versionText));
- case "Linux":
string distroName;
Version version;
ReadDistroNameAndVersion(out distroName, out version);
return new Platform(os, architecture, version, distroName);
- default:
- throw new ArgumentException(nameof(os));
- }
}
private static void ReadDistroNameAndVersion(out string distroName, out Version version)
diff --git a/src/OmniSharp.Http.Driver/OmniSharp.Http.Driver.csproj b/src/OmniSharp.Http.Driver/OmniSharp.Http.Driver.csproj
index e0c80381..999345ed 100644
--- a/src/OmniSharp.Http.Driver/OmniSharp.Http.Driver.csproj
+++ b/src/OmniSharp.Http.Driver/OmniSharp.Http.Driver.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net6.0;net472</TargetFrameworks>
+ <TargetFrameworks>net7.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<AssemblyName>OmniSharp</AssemblyName>
<OutputType>Exe</OutputType>
@@ -9,7 +9,7 @@
<RuntimeIdentifiers>win7-x64;win7-x86;win10-arm64</RuntimeIdentifiers>
<!-- Always run on the latest runtime installed. -->
- <RuntimeFrameworkVersion>6.0.0-preview.7.21317.1</RuntimeFrameworkVersion>
+ <RuntimeFrameworkVersion>7.0.0</RuntimeFrameworkVersion>
<RollForward>LatestMajor</RollForward>
<SkipHostDlls Condition="'$(TargetFramework)' != 'net472'">true</SkipHostDlls>
</PropertyGroup>
diff --git a/src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj b/src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj
index 02d9a658..f00db1f4 100644
--- a/src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj
+++ b/src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net6.0;net472</TargetFrameworks>
+ <TargetFrameworks>net7.0;net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<AssemblyName>OmniSharp</AssemblyName>
<OutputType>Exe</OutputType>
@@ -9,7 +9,7 @@
<RuntimeIdentifiers>win7-x64;win7-x86;win10-arm64</RuntimeIdentifiers>
<!-- Always run on the latest runtime installed. -->
- <RuntimeFrameworkVersion>6.0.0-preview.7.21317.1</RuntimeFrameworkVersion>
+ <RuntimeFrameworkVersion>7.0.0</RuntimeFrameworkVersion>
<RollForward>LatestMajor</RollForward>
<SkipHostDlls Condition="'$(TargetFramework)' != 'net472'">true</SkipHostDlls>
</PropertyGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment