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

Fix WinFX casing and targets import #5425

Closed
wants to merge 4 commits into from
Closed
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
4 changes: 2 additions & 2 deletions eng/BootStrapMSBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<ShimTargets Include="Microsoft.Data.Entity.targets" />
<ShimTargets Include="Microsoft.ServiceModel.targets" />
<ShimTargets Include="Microsoft.WinFx.targets" />
<ShimTargets Include="Microsoft.WinFX.targets" />
<ShimTargets Include="Microsoft.WorkflowBuildExtensions.targets" />
<ShimTargets Include="Microsoft.Xaml.targets" />
<ShimTargets Include="Workflow.Targets" />
Expand Down Expand Up @@ -155,7 +155,7 @@
<!-- Copy our binaries to the x64 location. -->
<Copy SourceFiles="@(FreshlyBuiltBinariesx64)"
DestinationFiles="@(FreshlyBuiltBinariesx64 -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\Bin\amd64\%(RecursiveDir)%(Filename)%(Extension)')" />

<!-- Copy our freshly-built props and targets, overwriting anything we copied from the machine -->
<Copy SourceFiles="@(FreshlyBuiltRootProjects)"
DestinationFiles="@(FreshlyBuiltRootProjects -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\%(Filename)%(Extension)')" />
Expand Down
4 changes: 2 additions & 2 deletions scripts/Deploy-MSBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Set-StrictMode -Version "Latest"
$ErrorActionPreference = "Stop"

function Copy-WithBackup ($origin) {
$directoryPart = Join-Path -Path $destination $origin.IntermediaryDirectories
$directoryPart = Join-Path -Path $destination $origin.IntermediaryDirectories
$destinationPath = Join-Path -Path $directoryPart (Split-Path $origin.SourceFile -leaf)

if (Test-Path $destinationPath -PathType Leaf) {
Expand Down Expand Up @@ -94,7 +94,7 @@ if ($runtime -eq "Desktop") {

FileToCopy "$bootstrapBinDirectory\Microsoft.Data.Entity.targets"
FileToCopy "$bootstrapBinDirectory\Microsoft.ServiceModel.targets"
FileToCopy "$bootstrapBinDirectory\Microsoft.WinFx.targets"
FileToCopy "$bootstrapBinDirectory\Microsoft.WinFX.targets"
FileToCopy "$bootstrapBinDirectory\Microsoft.WorkflowBuildExtensions.targets"
FileToCopy "$bootstrapBinDirectory\Microsoft.Xaml.targets"
FileToCopy "$bootstrapBinDirectory\Workflow.targets"
Expand Down
30 changes: 15 additions & 15 deletions src/Deprecated/Engine/Shared/FrameworkLocationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.Build.BuildEngine.Shared
internal static class FrameworkLocationHelper
{
#region Private and internal members

/// <summary>
/// By default when a root path is not specified we would like to use the program files directory \ reference assemblies\framework as the root location
/// to generate the reference assembly paths from.
Expand All @@ -42,18 +42,18 @@ internal static class FrameworkLocationHelper
private const string dotNetFrameworkVersionV20 = "v2.0.50727"; // full Whidbey version to pass to NativeMethodsShared.GetRequestedRuntimeInfo().
private const string dotNetFrameworkRegistryKeyV20 = dotNetFrameworkSetupRegistryPath + "\\" + dotNetFrameworkVersionV20;

internal const string dotNetFrameworkVersionFolderPrefixV30 = "v3.0"; // v3.0 is for WinFx.
private const string dotNetFrameworkVersionV30 = "v3.0"; // full WinFx version to pass to NativeMethodsShared.GetRequestedRuntimeInfo().
internal const string dotNetFrameworkVersionFolderPrefixV30 = "v3.0"; // v3.0 is for WinFX.
private const string dotNetFrameworkVersionV30 = "v3.0"; // full WinFX version to pass to NativeMethodsShared.GetRequestedRuntimeInfo().
private const string dotNetFrameworkAssemblyFoldersRegistryKeyV30 = dotNetFrameworkAssemblyFoldersRegistryPath + "\\" + dotNetFrameworkVersionFolderPrefixV30;
private const string dotNetFrameworkRegistryKeyV30 = dotNetFrameworkSetupRegistryPath + "\\" + dotNetFrameworkVersionFolderPrefixV30 +"\\Setup";

private const string dotNetFrameworkSdkRegistryPathV35 = "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.0A";
internal const string fullDotNetFrameworkSdkRegistryKeyV35 = "HKEY_LOCAL_MACHINE\\" + dotNetFrameworkSdkRegistryPathV35;
private const string dotNetFrameworkRegistryKeyV35 = dotNetFrameworkSetupRegistryPath + "\\" + dotNetFrameworkVersionFolderPrefixV35;
internal const string dotNetFrameworkSdkInstallKeyValueV35 = "InstallationFolder";

internal const string dotNetFrameworkVersionFolderPrefixV35 = "v3.5"; // v3.5 is for Orcas.

private const string dotNetFrameworkAssemblyFoldersRegistryKeyV35 = dotNetFrameworkAssemblyFoldersRegistryPath + "\\" + dotNetFrameworkVersionFolderPrefixV35;
private const string secondaryDotNetFrameworkSdkRegistryPathV35 = "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows";
internal const string secondaryDotNetFrameworkSdkInstallKeyValueV35 = "CurrentInstallFolder";
Expand All @@ -70,8 +70,8 @@ internal static class FrameworkLocationHelper
internal const string secondaryDotNetFrameworkSdkInstallKeyValueV40 = "CurrentInstallFolder";
private const string dotNetFrameworkRegistryKeyV40 = dotNetFrameworkSetupRegistryPath + "\\v4\\Full";
private static readonly GetDirectories getDirectories = new GetDirectories(Directory.GetDirectories);


private static string pathToDotNetFrameworkV11;
internal static string PathToDotNetFrameworkV11
{
Expand Down Expand Up @@ -256,13 +256,13 @@ internal static string PathToDotNetFrameworkSdkV35
dotNetFrameworkSdkInstallKeyValueV35);

// Because there is no longer a strong 1:1 mapping between FX versions and SDK
// versions, if we're unable to locate the desired SDK version, we will try to
// versions, if we're unable to locate the desired SDK version, we will try to
// use whichever SDK version is installed by looking at the key pointing to the
// "latest" version.
//
// This isn't ideal, but it will allow our tasks to function on any of several
// This isn't ideal, but it will allow our tasks to function on any of several
// related SDKs even if they don't have exactly the same versions.

if (String.IsNullOrEmpty(FrameworkLocationHelper.pathToDotNetFrameworkSdkV35))
{
FrameworkLocationHelper.pathToDotNetFrameworkSdkV35 = FindRegistryValueUnderKey(
Expand All @@ -289,11 +289,11 @@ internal static string PathToDotNetFrameworkSdkV40
dotNetFrameworkSdkInstallKeyValueV40);

// Because there is no longer a strong 1:1 mapping between FX versions and SDK
// versions, if we're unable to locate the desired SDK version, we will try to
// versions, if we're unable to locate the desired SDK version, we will try to
// use whichever SDK version is installed by looking at the key pointing to the
// "latest" version. For example, instead of 6.0A, we might fall back to 6.0B.
//
// This isn't ideal, but it will allow our tasks to function on any of several
// This isn't ideal, but it will allow our tasks to function on any of several
// related SDKs even if they don't have exactly the same versions.

if (String.IsNullOrEmpty(FrameworkLocationHelper.pathToDotNetFrameworkSdkV40))
Expand Down Expand Up @@ -520,7 +520,7 @@ GetDirectories getDirectories
// The intention here is to choose the alphabetical maximum.
string max = directories[0];

// the max.EndsWith condition: pre beta 2 versions of v3.5 have build number like v3.5.20111.
// the max.EndsWith condition: pre beta 2 versions of v3.5 have build number like v3.5.20111.
// This was removed in beta2
// We should favor \v3.5 over \v3.5.xxxxx
// versions previous to 2.0 have .xxxx version numbers. 3.0 and 3.5 do not.
Expand All @@ -544,7 +544,7 @@ GetDirectories getDirectories
}

#endregion

/// <summary>
/// Determine the 32 bit program files directory, this is used for finding where the reference assemblies live.
/// </summary>
Expand All @@ -563,7 +563,7 @@ internal static string GenerateProgramFiles32()
}

/// <summary>
/// Generate the path to the program files reference assembly location by taking in the program files special folder and then
/// Generate the path to the program files reference assembly location by taking in the program files special folder and then
/// using that path to generate the path to the reference assemblies location.
/// </summary>
internal static string GenerateProgramFilesReferenceAssemblyRoot()
Expand Down
2 changes: 1 addition & 1 deletion src/MSBuild/MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Build.Framework.tlb" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Data.Entity.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.ServiceModel.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WinFx.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WinFX.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WorkflowBuildExtensions.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Xaml.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
<_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Workflow.Targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<file src="$X86BinPath$/Microsoft.ServiceModel.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.VisualBasic.CrossTargeting.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.VisualBasic.CurrentVersion.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.WinFx.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.WinFX.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.WorkflowBuildExtensions.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Microsoft.Xaml.targets" target="v15.0/bin" />
<file src="$X86BinPath$/Workflow.targets" target="v15.0/bin" />
Expand Down Expand Up @@ -114,7 +114,7 @@
<file src="$X86BinPath$/Microsoft.ServiceModel.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.VisualBasic.CrossTargeting.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.VisualBasic.CurrentVersion.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.WinFx.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.WinFX.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.WorkflowBuildExtensions.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Microsoft.Xaml.targets" target="v15.0/bin/amd64" />
<file src="$X86BinPath$/Workflow.targets" target="v15.0/bin/amd64" />
Expand Down
4 changes: 2 additions & 2 deletions src/Package/MSBuild.VSSetup/files.swr
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ folder InstallDir:\MSBuild\Current\Bin
file source=$(X86BinPath)Microsoft.Xaml.targets
file source=$(X86BinPath)Microsoft.Data.Entity.targets
file source=$(X86BinPath)Microsoft.ServiceModel.targets
file source=$(X86BinPath)Microsoft.WinFx.targets
file source=$(X86BinPath)Microsoft.WinFX.targets
file source=$(X86BinPath)Microsoft.WorkflowBuildExtensions.targets

folder InstallDir:\MSBuild\Current\Bin\MSBuild
Expand Down Expand Up @@ -222,7 +222,7 @@ folder InstallDir:\MSBuild\Current\Bin\amd64
file source=$(X86BinPath)Microsoft.Xaml.targets
file source=$(X86BinPath)Microsoft.Data.Entity.targets
file source=$(X86BinPath)Microsoft.ServiceModel.targets
file source=$(X86BinPath)Microsoft.WinFx.targets
file source=$(X86BinPath)Microsoft.WinFX.targets
file source=$(X86BinPath)Microsoft.WorkflowBuildExtensions.targets

folder InstallDir:\MSBuild\Current\Bin\amd64\MSBuild
Expand Down
Loading