Cannot build the solution and throws "Architecture Debu|MCD is invalid"
See original GitHub issueI tried to build the solution using the build.cmd but all the time I was getting the exception “”. After a lot of research I found the culprit. My computer is HP and by default sets an environment variable called Platform and the build process relies heavily on this variable.
Solution
Add the line SET Platform=
to build.cmd file.
Also there is an issue reported in the Nuget Repo about this issue https://github.com/NuGet/Home/issues/4882
The same changes need to be applied to restore.cmd and test.cmd.
I have the solution in this branch https://github.com/andresff/EntityFrameworkCore/tree/issue18305 and can do a PR if you want it.
Steps to reproduce
- Set an environment variable called Platform to build.cmd file before executing the powershell command.
SET Platform=MCD
- run
build.cmd
Restore completed in 4,75 sec for C:\Users\andres.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.19474.3\tools\Tools.proj. Architecture not supported. If you think this is a bug, report it at https://github.com/dotnet/cli/issues System.Management.Automation.RuntimeException: Architecture not supported. If you think this is a bug, report it at https://github.com/dotnet/cli/issues at Get-CLIArchitecture-From-Architecture, C:\Andres\EntityFrameworkCore.dotnet\dotnet-install.ps1: line 169 at <ScriptBlock>, C:\Andres\EntityFrameworkCore.dotnet\dotnet-install.ps1: line 536 at InstallDotNet, C:\Andres\EntityFrameworkCore\eng\common\tools.ps1: line 198 at <ScriptBlock>, C:\Andres\EntityFrameworkCore\eng\common\dotnet-install.ps1: line 18 at <ScriptBlock>, <No file>: line 1 C:\Users\andres.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.19474.3\tools\InstallDotNetCore.targets(15,5): error : dotnet-install failed [C:\Users\andres.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.19474.3\tools\Tools.proj]
C:\Andres\EntityFrameworkCore\All.sln.metaproj : error MSB4126: The specified solution configuration “Debug|MCD” is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform=“Any CPU”) or leave those properties blank to use the default solution configuration. [C:\Andres\EntityFrameworkCore\All.sln]
Build FAILED.
Further technical details
EF Core version: Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer) Target framework: (e.g. .NET Core 3.0) Operating system: Windows 10 IDE: (e.g. Visual Studio 2019 16.3)
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
My apologies, my wording was poor earlier and I should not have implied anyone’s approval was necessary to open a PR.
No. @smitpatel was asking for members of that team to respond. So, here I am 😺
This seems like an odd corner case but setting the environment variable should be fine and won’t interfere with using
-platform {some platform}
on one of the command lines.I suggest fixing this in https://github.com/dotnet/arcade/blob/master/eng/common/build.ps1 and perhaps https://github.com/aspnet/EntityFrameworkCore/blob/master/startvs.cmd (and similar files in other ASP.NET Core repos) would help building / testing / … far more repos than what you’ve done in andresff/EntityFrameworkCore@56934b5a9a5c. If @markwilkie agrees, please open a PR in the dotnet/Arcade repo. @markwilkie❔
Many thanks.