Skip to content
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

Avoid Microsoft.IO.Redist #3947

Merged
merged 3 commits into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 1 addition & 6 deletions build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<PackageReference Update="Microsoft.CodeAnalysis.Build.Tasks" Version="3.0.0-beta1-61516-01" />
<PackageReference Update="Microsoft.DotNet.BuildTools.GenAPI" Version="2.1.0-prerelease-02404-02" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
<!-- Update binding redirect in app.config and app.amd64.config when changing this -->
<PackageReference Update="Microsoft.IO.Redist" Version="4.6.0-preview1-26822-04" />
<PackageReference Update="Microsoft.Net.Compilers" Version="$(MicrosoftNetCompilersVersion)" />
<PackageReference Update="Microsoft.NETCore.Compilers" Version="$(MicrosoftNetCoreCompilersVersion)" />
<PackageReference Update="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.15" />
Expand All @@ -28,13 +26,11 @@
<PackageReference Update="SourceLink.Create.CommandLine" Version="2.1.2" />
<PackageReference Update="System.CodeDom" Version="4.4.0" />
<PackageReference Update="System.Collections.Concurrent" Version="4.3.0" />
<!-- Update binding redirect in app.config and app.amd64.config when changing this -->
<PackageReference Update="System.Collections.Immutable" Version="1.5.0" />
<PackageReference Update="System.Diagnostics.TraceSource" Version="4.0.0" />
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
<PackageReference Update="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Update="System.Linq.Parallel" Version="4.0.1" />
<PackageReference Update="System.Memory" Version="4.5.1" />
<PackageReference Update="System.Net.Http" Version="4.3.0" />
<PackageReference Update="System.Reflection.Metadata" Version="1.6.0" />
<PackageReference Update="System.Reflection.TypeExtensions" Version="4.1.0" />
Expand All @@ -44,8 +40,7 @@
<PackageReference Update="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Update="System.Security.Principal.Windows" Version="4.3.0" />
<PackageReference Update="System.Text.Encoding.CodePages" Version="4.0.1" />

<!-- Update binding redirect in app.config and app.amd64.config when changing this -->

<PackageReference Update="System.Threading.Tasks.Dataflow" Version="4.5.24.0" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Version="4.6.0" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'"/>

Expand Down
6 changes: 1 addition & 5 deletions build/SignToolData.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@
"exclude": [
"mscorlib.dll",
"netstandard.dll",
"System.Buffers.dll",
"System.Collections.Immutable.dll",
"System.Numerics.Vectors.dll",
"System.Memory.dll",
"System.Threading.Tasks.Dataflow.dll",
"Microsoft.IO.Redist.dll"
"System.Threading.Tasks.Dataflow.dll"
]
}
3 changes: 1 addition & 2 deletions build/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
https://dotnet.myget.org/F/nuget-build/api/v3/index.json;
https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json;
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
</RestoreSources>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectRootElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ public void Save(Encoding saveEncoding)

_encoding = saveEncoding;

var fileInfo = FileUtilities.GetFileInfoNoThrow(_projectFileLocation.File);
FileInfo fileInfo = FileUtilities.GetFileInfoNoThrow(_projectFileLocation.File);

// If the file was deleted by a race with someone else immediately after it was written above
// then we obviously can't read the write time. In this obscure case, we'll retain the
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Evaluation/ProjectRootElementCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ internal ProjectRootElement Get(string projectFile, OpenProjectRootElement openP

if (projectRootElement != null && _autoReloadFromDisk)
{
var fileInfo = FileUtilities.GetFileInfoNoThrow(projectFile);
FileInfo fileInfo = FileUtilities.GetFileInfoNoThrow(projectFile);

// If the file doesn't exist on disk, go ahead and use the cached version.
// It's an in-memory project that hasn't been saved yet.
Expand Down
5 changes: 1 addition & 4 deletions src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@
<ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" />

<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Threading.Tasks.Dataflow" />
<PackageReference Include="System.Reflection.Metadata" Condition="'$(MonoBuild)' == 'true'" />

<PackageReference Include="System.Reflection.Metadata" Condition="'$(MonoBuild)' == 'true'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(MonoBuild)' != 'true'" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />

<Reference Include="System.Configuration" />
<Reference Include="System.IO.Compression" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
<PackageReference Include="Shouldly" />
<PackageReference Include="System.Memory" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" />
<ProjectReference Include="..\Xunit.NetCore.Extensions\Xunit.NetCore.Extensions.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(MonoBuild)' != 'true'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<!-- Need Win32 API on .NET Core to ping registry to determine long path support -->
<PackageReference Include="Microsoft.Win32.Registry" />
Expand Down
14 changes: 0 additions & 14 deletions src/MSBuild/app.amd64.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@
<codeBase version="15.1.0.0" href="..\Microsoft.Build.Conversion.Core.dll"/>
</dependentAssembly>

<!-- Redirects for dlls redistributed by msbuild. Tasks depending on these will fail if they target older versions without msbuild redirecting them -->
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Dataflow" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-4.5.24.0" newVersion="4.5.24.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IO.Redist" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>

<!-- Redirects for components dropped by Visual Studio -->
<dependentAssembly>
<assemblyIdentity name="Microsoft.Activities.Build" culture="neutral" publicKeyToken="31bf3856ad364e35" />
Expand Down
16 changes: 0 additions & 16 deletions src/MSBuild/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="15.1.0.0" />
</dependentAssembly>

<!-- Redirects for dlls redistributed by msbuild. Tasks depending on these will fail if they target older versions without msbuild redirecting them.
If devenv.exe's app.config also redirects these dlls, then the redirected versions in our app.config need to match devenv's
-->
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Dataflow" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-4.5.24.0" newVersion="4.5.24.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IO.Redist" culture="neutral" publicKeyToken="b77a5c561934e089" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>

<!-- Redirects for components dropped by Visual Studio -->
<dependentAssembly>
<assemblyIdentity name="Microsoft.Activities.Build" culture="neutral" publicKeyToken="31bf3856ad364e35" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
<file src="$X86BinPath$/Microsoft.Build.Framework.dll" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.Build.Tasks.Core.dll" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.Build.Utilities.Core.dll" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.IO.Redist.dll" target="v15.0/bin" />
<file src="$X86BinPath$/System.Buffers.dll" target="v15.0/bin" />
<file src="$X86BinPath$/System.Collections.Immutable.dll" target="v15.0/bin" />
<file src="$X86BinPath$/System.Memory.dll" target="v15.0/bin" />
<file src="$X86BinPath$/System.Threading.Tasks.Dataflow.dll" target="v15.0/bin" />

<file src="$X86BinPath$/Microsoft.Build.Core.xsd" target="v15.0/bin/MSBuild" />
Expand Down Expand Up @@ -71,10 +68,7 @@
<file src="$X86BinPath$/Microsoft.Build.Framework.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.Build.Tasks.Core.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.Build.Utilities.Core.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.IO.Redist.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/System.Buffers.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/System.Collections.Immutable.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/System.Memory.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/System.Threading.Tasks.Dataflow.dll" target="v15.0/bin/amd64" />

<file src="$X86BinPath$/Microsoft.Build.Core.xsd" target="v15.0/bin/amd64/MSBuild" />
Expand Down
8 changes: 0 additions & 8 deletions src/Package/MSBuild.VSSetup/files.swr
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ folder InstallDir:\MSBuild\Current\Bin
file source=$(X86BinPath)Microsoft.Build.Framework.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Build.Tasks.Core.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Build.Utilities.Core.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.IO.Redist.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)MSBuild.exe vs.file.ngenArchitecture=x86
file source=$(X86BinPath)MSBuild.exe.config
file source=$(TaskHostBinPath)MSBuildTaskHost.exe vs.file.ngenArchitecture=x86
file source=$(TaskHostBinPath)MSBuildTaskHost.exe.config
file source=$(X86BinPath)System.Threading.Tasks.Dataflow.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Buffers.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Collections.Immutable.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Memory.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Numerics.Vectors.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Common.CurrentVersion.targets
file source=$(X86BinPath)Microsoft.Common.CrossTargeting.targets
file source=$(X86BinPath)Microsoft.Common.overridetasks
Expand Down Expand Up @@ -159,12 +155,8 @@ folder InstallDir:\MSBuild\Current\Bin\amd64
file source=$(X86BinPath)Microsoft.Build.Framework.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Build.Tasks.Core.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Build.Utilities.Core.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.IO.Redist.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Threading.Tasks.Dataflow.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Buffers.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Collections.Immutable.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Memory.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Numerics.Vectors.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Common.CurrentVersion.targets
file source=$(X86BinPath)Microsoft.Common.CrossTargeting.targets
file source=$(X86BinPath)Microsoft.Common.overridetasks
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Modifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ internal static string GetItemSpecModifier(string currentDirectory, string itemS
// to unescape first.
string unescapedItemSpec = EscapingUtilities.UnescapeAll(itemSpec);

var info = FileUtilities.GetFileInfoNoThrow(unescapedItemSpec);
FileInfo info = FileUtilities.GetFileInfoNoThrow(unescapedItemSpec);

if (info != null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/UnitTests/FileUtilities_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void GetFileInfoNoThrowBasic()
try
{
file = FileUtilities.GetTemporaryFile();
var info = FileUtilities.GetFileInfoNoThrow(file);
FileInfo info = FileUtilities.GetFileInfoNoThrow(file);
Assert.Equal(info.LastWriteTime, new FileInfo(file).LastWriteTime);
}
finally
Expand All @@ -181,7 +181,7 @@ public void GetFileInfoNoThrowBasic()
[Fact]
public void GetFileInfoNoThrowNonexistent()
{
var info = FileUtilities.GetFileInfoNoThrow("this_file_is_nonexistent");
FileInfo info = FileUtilities.GetFileInfoNoThrow("this_file_is_nonexistent");
Assert.Null(info);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/DependencyFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ internal DependencyFile(string filename)
/// <returns></returns>
internal bool HasFileChanged()
{
var info = FileUtilities.GetFileInfoNoThrow(filename);
FileInfo info = FileUtilities.GetFileInfoNoThrow(filename);

// Obviously if the file no longer exists then we are not up to date.
if (info == null || !info.Exists)
Expand Down
2 changes: 0 additions & 2 deletions src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Memory" />
</ItemGroup>

<!-- Tasks need to mimic redistributing the compilers, so add references to both full framework and .net core -->
Expand All @@ -971,7 +970,6 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(MonoBuild)' != 'true'" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
<PackageReference Include="System.Threading.Tasks.Dataflow" />

Expand Down
7 changes: 1 addition & 6 deletions src/Utilities/Microsoft.Build.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

<ItemGroup>
<ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" />

<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Memory" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'">
Expand All @@ -33,10 +32,6 @@
<PackageReference Include="System.Text.Encoding.CodePages" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(MonoBuild)' != 'true'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<!-- Need Win32 API on .NET Core to ping registry to determine long path support -->
<PackageReference Include="Microsoft.Win32.Registry" />
Expand Down