Skip to content

Upgrade to net9 #11535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
-->
<Otherwise>
<PropertyGroup>
<DefaultNetCoreTargetFramework>net8.0</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFramework Condition="'$(IsVSCodeOnly)' == 'true'">net9.0</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFramework Condition="'$(IsVSCodeOnly)' != 'true'">net8.0</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework)</DefaultNetCoreTargetFrameworks>
</PropertyGroup>
</Otherwise>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public static byte[] GetResourceBytes(string name, string? folder = null)
using var stream = GetResourceStream(name, folder);

value = new byte[stream.Length];

#if NET
stream.ReadExactly(value);
#else
stream.Read(value, 0, value.Length);
#endif

s_bytesMap.Add(key, value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void WriteSize(this Stream stream, int length)
public unsafe static int ReadSize(this Stream stream)
{
Span<byte> bytes = stackalloc byte[4];
stream.Read(bytes);
stream.ReadExactly(bytes);
return BitConverter.ToInt32(bytes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<EnableApiCheck>false</EnableApiCheck>
<IsShippingPackage>true</IsShippingPackage>
<IsPackable>true</IsPackable>
<IsVSCodeOnly>true</IsVSCodeOnly>

<!-- This is not a standard nuget package and only consumed by the extension build. We don't care if the folder structure doesn't match what nuget expects. -->
<NoWarn>$(NoWarn);NU5100</NoWarn>
Expand Down
1 change: 1 addition & 0 deletions src/Razor/src/rzls/rzls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<EnableApiCheck>false</EnableApiCheck>
<IsShippingPackage>true</IsShippingPackage>
<RollForward>LatestMajor</RollForward>
<IsVSCodeOnly>true</IsVSCodeOnly>
<!--
Build a nuget package for this project. This is not consumed as a standard NuGet package; it just
contains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ public static byte[] GetResourceBytes(string name, string? folder = null)
using var stream = GetResourceStream(name, folder);

value = new byte[stream.Length];

#if NET
stream.ReadExactly(value);
#else
stream.Read(value, 0, value.Length);
#endif

s_bytesMap.Add(key, value);

Expand Down