-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
I 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 NuGet/Home#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 , C:\Andres\EntityFrameworkCore.dotnet\dotnet-install.ps1: line 536
at InstallDotNet, C:\Andres\EntityFrameworkCore\eng\common\tools.ps1: line 198
at , C:\Andres\EntityFrameworkCore\eng\common\dotnet-install.ps1: line 18
at , : 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)