Skip to content

Commit 946e916

Browse files
authored
!fixup! Remove more WebAssembly template mentions (#33497)
* !fixup! Remove more WebAssembly template mentions - follow up to part of b6c411f - more dangling references to a non-existent project * !temporary! Try using 64bit `msbuild` - will be mostly overwritten in next 3.1 Arcade update
1 parent 29bdf0c commit 946e916

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

eng/common/tools.ps1

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
211211
InstallDotNet -dotnetRoot $dotnetRoot -version $version -architecture $architecture -skipNonVersionedFiles $false -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey
212212
}
213213

214-
function InstallDotNet([string] $dotnetRoot,
215-
[string] $version,
216-
[string] $architecture = "",
217-
[string] $runtime = "",
218-
[bool] $skipNonVersionedFiles = $false,
219-
[string] $runtimeSourceFeed = "",
214+
function InstallDotNet([string] $dotnetRoot,
215+
[string] $version,
216+
[string] $architecture = "",
217+
[string] $runtime = "",
218+
[bool] $skipNonVersionedFiles = $false,
219+
[string] $runtimeSourceFeed = "",
220220
[string] $runtimeSourceFeedKey = "") {
221221

222222
$installScript = GetDotNetInstallScript $dotnetRoot
@@ -323,7 +323,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
323323
}
324324

325325
$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
326-
return $global:_MSBuildExe = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin\msbuild.exe"
326+
327+
$local:BinFolder = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin"
328+
$local:Prefer64bit = if ($vsRequirements.Prefer64bit) { $vsRequirements.Prefer64bit } else { $false }
329+
if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder "amd64"))) {
330+
$global:_MSBuildExe = Join-Path $local:BinFolder "amd64\msbuild.exe"
331+
} else {
332+
$global:_MSBuildExe = Join-Path $local:BinFolder "msbuild.exe"
333+
}
334+
335+
return $global:_MSBuildExe
327336
}
328337

329338
function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [string] $vsMajorVersion) {
@@ -523,7 +532,7 @@ function InitializeNativeTools() {
523532
}
524533
}
525534

526-
function InitializeToolset([string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey)
535+
function InitializeToolset([string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey)
527536
{
528537
if (Test-Path variable:global:_ToolsetBuildProj) {
529538
return $global:_ToolsetBuildProj

global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"Microsoft.VisualStudio.Component.VC.ATL",
2121
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
2222
"Microsoft.VisualStudio.Component.Windows10SDK.17134"
23-
]
23+
],
24+
"Prefer64bit": true
2425
}
2526
},
2627
"msbuild-sdks": {

src/ProjectTemplates/ProjectTemplatesNoDeps.slnf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
"solution": {
33
"path": "ProjectTemplates.sln",
44
"projects": [
5-
"ComponentsWebAssembly.ProjectTemplates\\Microsoft.AspNetCore.Components.WebAssembly.Templates.csproj",
65
"Web.Client.ItemTemplates\\Microsoft.DotNet.Web.Client.ItemTemplates.csproj",
76
"Web.ItemTemplates\\Microsoft.DotNet.Web.ItemTemplates.csproj",
87
"Web.ProjectTemplates\\Microsoft.DotNet.Web.ProjectTemplates.csproj",
98
"Web.Spa.ProjectTemplates\\Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj",
109
"test\\ProjectTemplates.Tests.csproj"
1110
]
1211
}
13-
}
12+
}

src/ProjectTemplates/test/ProjectTemplates.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
</ItemGroup>
3838

3939
<ItemGroup>
40-
<ProjectReference Include="../ComponentsWebAssembly.ProjectTemplates/Microsoft.AspNetCore.Components.WebAssembly.Templates.csproj" ReferenceOutputAssembly="false" />
4140
<ProjectReference Include="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj">
4241
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
4342
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
@@ -68,7 +67,7 @@
6867
<_Parameter2>true</_Parameter2>
6968
</AssemblyAttribute>
7069
</ItemGroup>
71-
70+
7271
<Target Name="PrepareForTest" BeforeTargets="CoreCompile" Condition="$(DesignTimeBuild) != true">
7372
<PropertyGroup>
7473
<TestTemplateCreationFolder>$([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)'))</TestTemplateCreationFolder>

0 commit comments

Comments
 (0)