Skip to content

Commit 44f2bca

Browse files
authored
Stop NGENing System.Net.Http and dependencies (#27537)
* Stop NGENing System.Net.Http and dependencies * Added comment to explain why * Fix BuildBoss
1 parent c62e7e0 commit 44f2bca

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ folder InstallDir:\MSBuild\15.0\Bin\Roslyn
4141
file source=$(OutputPath)\Vsix\CompilerExtension\Microsoft.Win32.Primitives.dll vs.file.ngenArchitecture=all
4242
file source=$(OutputPath)\Vsix\CompilerExtension\System.AppContext.dll vs.file.ngenArchitecture=all
4343
file source=$(OutputPath)\Vsix\CompilerExtension\System.Console.dll vs.file.ngenArchitecture=all
44-
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.DiagnosticSource.dll vs.file.ngenArchitecture=all
4544
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.FileVersionInfo.dll vs.file.ngenArchitecture=all
4645
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.StackTrace.dll vs.file.ngenArchitecture=all
4746
file source=$(OutputPath)\Vsix\CompilerExtension\System.Globalization.Calendars.dll vs.file.ngenArchitecture=all
4847
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.dll vs.file.ngenArchitecture=all
4948
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.ZipFile.dll vs.file.ngenArchitecture=all
5049
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.dll vs.file.ngenArchitecture=all
5150
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.Primitives.dll vs.file.ngenArchitecture=all
52-
file source=$(OutputPath)\Vsix\CompilerExtension\System.Net.Http.dll vs.file.ngenArchitecture=all
5351
file source=$(OutputPath)\Vsix\CompilerExtension\System.Net.Sockets.dll vs.file.ngenArchitecture=all
5452
file source=$(OutputPath)\Vsix\CompilerExtension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngenArchitecture=all
5553
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Algorithms.dll vs.file.ngenArchitecture=all
@@ -62,6 +60,10 @@ folder InstallDir:\MSBuild\15.0\Bin\Roslyn
6260
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngenArchitecture=all
6361
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngenArchitecture=all
6462
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngenArchitecture=all
63+
# We never load these binaries, and it does not generate the correct binding redirects, so do not NGEN them
64+
# https://github.com/dotnet/roslyn/pull/27537
65+
file source=$(OutputPath)\Vsix\CompilerExtension\System.Net.Http.dll
66+
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.DiagnosticSource.dll
6567

6668
folder InstallDir:\Common7\Tools\vsdevcmd\ext
6769
file source=$(RepoRoot)\src\Setup\MSBuildScripts\roslyn.bat

src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,16 @@ IEnumerable<string> getPartsInFolder()
302302
/// </summary>
303303
private bool VerifySwrFile(TextWriter textWriter, List<string> dllFileNames)
304304
{
305-
var nativeDlls = new[] { "Microsoft.DiaSymReader.Native.amd64.dll", "Microsoft.DiaSymReader.Native.x86.dll" };
305+
var excludedDlls = new[]
306+
{
307+
"Microsoft.DiaSymReader.Native.amd64.dll", // native
308+
"Microsoft.DiaSymReader.Native.x86.dll", // native
309+
"System.Net.Http.dll", // not loaded: https://github.com/dotnet/roslyn/pull/27537
310+
"System.Diagnostics.DiagnosticSource.dll", // not loaded: https://github.com/dotnet/roslyn/pull/27537
311+
};
312+
306313
var map = dllFileNames
307-
.Where(x => !nativeDlls.Contains(x, PathComparer))
314+
.Where(x => !excludedDlls.Contains(x, PathComparer))
308315
.ToDictionary(
309316
keySelector: x => x,
310317
elementSelector: _ => false,

0 commit comments

Comments
 (0)