1 year ago
#77420

fyardlest
Why dotnet restore is not working and return platform error?
I am creating an API using dotnet 6 and while running dotnet restore I have the following error:
error MSB4126: The specified solution configuration "Debug|MCD" is invalid. Plid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:ofgrioConfiguration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration.
I have tried the following to try to solve the problem but unfortunately, it did not work do someone have another solution:
- Using regedit.exe, navigate to the registry path:
- Open the cmd: Windows button + R
- Type: regedit.exe
- In the new Window search the following: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
- Selected the key Platform that had the value MCD
- Double click on Platform to open it
- Then delete only the value MCD. After this, the key Platform was still there but empty,
- Restarted my computer
- Open your project and run the dotnet restore again.
Here is the solution.sln :
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API\API.csproj", "{95AB0461-5E0B-4672-96EE-0C1EE4FD4976}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{12487BCC-E637-4185-9A12-C98BA16F81E3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{4E4C08DA-700D-4487-962B-3854978C2107}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{95AB0461-5E0B-4672-96EE-0C1EE4FD4976}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95AB0461-5E0B-4672-96EE-0C1EE4FD4976}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95AB0461-5E0B-4672-96EE-0C1EE4FD4976}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95AB0461-5E0B-4672-96EE-0C1EE4FD4976}.Release|Any CPU.Build.0 = Release|Any CPU
{12487BCC-E637-4185-9A12-C98BA16F81E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12487BCC-E637-4185-9A12-C98BA16F81E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12487BCC-E637-4185-9A12-C98BA16F81E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12487BCC-E637-4185-9A12-C98BA16F81E3}.Release|Any CPU.Build.0 = Release|Any CPU
{4E4C08DA-700D-4487-962B-3854978C2107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E4C08DA-700D-4487-962B-3854978C2107}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4C08DA-700D-4487-962B-3854978C2107}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4C08DA-700D-4487-962B-3854978C2107}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
c#
asp.net
.net
.net-core
0 Answers
Your Answer