question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build the solution and throws "Architecture Debu|MCD is invalid"

See original GitHub issue

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 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

  1. Set an environment variable called Platform to build.cmd file before executing the powershell command. SET Platform=MCD
  2. 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:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dougbucommented, Oct 19, 2019

My apologies, my wording was poor earlier and I should not have implied anyone’s approval was necessary to open a PR.

1reaction
dougbucommented, Oct 13, 2019

that "build"part comes from AspNetCore-Tooling repo?

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix the Visual Studio compile error, "mismatch ...
When I try to compile the C++ DLL, I get this warning: warning MSB3270: There was a mismatch between the processor architecture of...
Read more >
Why Doesn't My Visual Studio Solution Build? A ...
By all means try it but don't be surprised when the solution still stubbornly refuses to build.
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
Troubleshoot broken references - Visual Studio
If your application attempts to use a broken reference, an exception error is generated. The main reason for the error is the inability...
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found