Skip to content

Commit

Permalink
Add reference to Microsoft.IO.Redist and System.Memory
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmihai committed Aug 30, 2018
1 parent 5335ca8 commit eb391dc
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 12 deletions.
4 changes: 3 additions & 1 deletion build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<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" />
<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 @@ -29,6 +30,7 @@
<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 @@ -38,7 +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" />

<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
3 changes: 2 additions & 1 deletion build/SignToolData.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"mscorlib.dll",
"netstandard.dll",
"System.Collections.Immutable.dll",
"System.Threading.Tasks.Dataflow.dll"
"System.Threading.Tasks.Dataflow.dll",
"Microsoft.IO.Redist.dll"
]
}
3 changes: 2 additions & 1 deletion build/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
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-buildtools/api/v3/index.json;
https://dotnet.myget.org/F/dotnet-core/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;

FileInfo fileInfo = FileUtilities.GetFileInfoNoThrow(_projectFileLocation.File);
var 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 @@ -208,7 +208,7 @@ internal ProjectRootElement Get(string projectFile, OpenProjectRootElement openP

if (projectRootElement != null && _autoReloadFromDisk)
{
FileInfo fileInfo = FileUtilities.GetFileInfoNoThrow(projectFile);
var 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: 4 additions & 1 deletion src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@
<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'" />

</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,13 +12,18 @@
<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
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +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.Collections.Immutable.dll" target="v15.0/bin" />
<file src="$X86BinPath$/System.Threading.Tasks.Dataflow.dll" target="v15.0/bin" />

Expand Down Expand Up @@ -68,7 +69,8 @@
<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$/System.Collections.Immutable.dll" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.IO.Redist.dll" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/System.Collections.Immutable.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
2 changes: 2 additions & 0 deletions src/Package/MSBuild.VSSetup/files.swr
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ folder InstallDir:\MSBuild\15.0\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
Expand Down Expand Up @@ -155,6 +156,7 @@ folder InstallDir:\MSBuild\15.0\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.Collections.Immutable.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)Microsoft.Common.CurrentVersion.targets
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);

FileInfo info = FileUtilities.GetFileInfoNoThrow(unescapedItemSpec);
var 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 @@ -168,7 +168,7 @@ public void GetFileInfoNoThrowBasic()
try
{
file = FileUtilities.GetTemporaryFile();
FileInfo info = FileUtilities.GetFileInfoNoThrow(file);
var info = FileUtilities.GetFileInfoNoThrow(file);
Assert.Equal(info.LastWriteTime, new FileInfo(file).LastWriteTime);
}
finally
Expand All @@ -180,7 +180,7 @@ public void GetFileInfoNoThrowBasic()
[Fact]
public void GetFileInfoNoThrowNonexistent()
{
FileInfo info = FileUtilities.GetFileInfoNoThrow("this_file_is_nonexistent");
var 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()
{
FileInfo info = FileUtilities.GetFileInfoNoThrow(filename);
var 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: 2 additions & 0 deletions src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@
</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 @@ -967,6 +968,7 @@
</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: 6 additions & 1 deletion src/Utilities/Microsoft.Build.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

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

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

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'">
Expand All @@ -31,6 +32,10 @@
<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

0 comments on commit eb391dc

Please sign in to comment.