Skip to content

Commit

Permalink
Stop NGENing System.Net.Http and dependencies (#27537)
Browse files Browse the repository at this point in the history
* Stop NGENing System.Net.Http and dependencies

* Added comment to explain why

* Fix BuildBoss
  • Loading branch information
OmarTawfik authored Jun 7, 2018
1 parent c62e7e0 commit 44f2bca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ folder InstallDir:\MSBuild\15.0\Bin\Roslyn
file source=$(OutputPath)\Vsix\CompilerExtension\Microsoft.Win32.Primitives.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.AppContext.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Console.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.DiagnosticSource.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.FileVersionInfo.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.StackTrace.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Globalization.Calendars.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.ZipFile.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.Primitives.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Net.Http.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Net.Sockets.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Algorithms.dll vs.file.ngenArchitecture=all
Expand All @@ -62,6 +60,10 @@ folder InstallDir:\MSBuild\15.0\Bin\Roslyn
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngenArchitecture=all
# We never load these binaries, and it does not generate the correct binding redirects, so do not NGEN them
# https://github.com/dotnet/roslyn/pull/27537
file source=$(OutputPath)\Vsix\CompilerExtension\System.Net.Http.dll
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.DiagnosticSource.dll

folder InstallDir:\Common7\Tools\vsdevcmd\ext
file source=$(RepoRoot)\src\Setup\MSBuildScripts\roslyn.bat
11 changes: 9 additions & 2 deletions src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,16 @@ IEnumerable<string> getPartsInFolder()
/// </summary>
private bool VerifySwrFile(TextWriter textWriter, List<string> dllFileNames)
{
var nativeDlls = new[] { "Microsoft.DiaSymReader.Native.amd64.dll", "Microsoft.DiaSymReader.Native.x86.dll" };
var excludedDlls = new[]
{
"Microsoft.DiaSymReader.Native.amd64.dll", // native
"Microsoft.DiaSymReader.Native.x86.dll", // native
"System.Net.Http.dll", // not loaded: https://github.com/dotnet/roslyn/pull/27537
"System.Diagnostics.DiagnosticSource.dll", // not loaded: https://github.com/dotnet/roslyn/pull/27537
};

var map = dllFileNames
.Where(x => !nativeDlls.Contains(x, PathComparer))
.Where(x => !excludedDlls.Contains(x, PathComparer))
.ToDictionary(
keySelector: x => x,
elementSelector: _ => false,
Expand Down

0 comments on commit 44f2bca

Please sign in to comment.