Error MSB4126: The specified solution configuration "Debug|oc" is invalid
Gerald Ortiz Candela
21
Reputation points
I have an netCore application deployed by jenkins that gets the following error.
error MSB4126: The specified solution configuration "Debug|oc" 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
In the csproj file in PropertyGroup tag I see the next condition
This is the complete code of the csproj file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<RootNamespace>com.tdp.afn</RootNamespace>
<PackageId>dotnetbase</PackageId>
<Version>0.1.1</Version>
<FunctionAppName>FN-genesis-dotnetbase</FunctionAppName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.7" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
And this the sln file
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.6.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{80098154-89C9-49F0-AF8B-11D9E275332A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "main", "main", "{414A0165-9926-47BE-BE72-39E163E627FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Functions", "src\main\Functions\Functions.csproj", "{D8438BFF-E079-4F92-9580-9186C12C4CCA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{31C5499E-2FCC-409B-90AF-847BB0C92B47}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Functions.Test", "src\test\Functions.Test\Functions.Test.csproj", "{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Debug|x64.ActiveCfg = Debug|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Debug|x64.Build.0 = Debug|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Debug|x86.ActiveCfg = Debug|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Debug|x86.Build.0 = Debug|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Release|Any CPU.Build.0 = Release|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Release|x64.ActiveCfg = Release|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Release|x64.Build.0 = Release|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Release|x86.ActiveCfg = Release|Any CPU
{D8438BFF-E079-4F92-9580-9186C12C4CCA}.Release|x86.Build.0 = Release|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Debug|x64.ActiveCfg = Debug|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Debug|x64.Build.0 = Debug|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Debug|x86.ActiveCfg = Debug|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Debug|x86.Build.0 = Debug|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Release|Any CPU.Build.0 = Release|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Release|x64.ActiveCfg = Release|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Release|x64.Build.0 = Release|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Release|x86.ActiveCfg = Release|Any CPU
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{414A0165-9926-47BE-BE72-39E163E627FB} = {80098154-89C9-49F0-AF8B-11D9E275332A}
{D8438BFF-E079-4F92-9580-9186C12C4CCA} = {414A0165-9926-47BE-BE72-39E163E627FB}
{31C5499E-2FCC-409B-90AF-847BB0C92B47} = {80098154-89C9-49F0-AF8B-11D9E275332A}
{20BB4BDB-C0E8-404C-BB83-44A03B0AEA29} = {31C5499E-2FCC-409B-90AF-847BB0C92B47}
EndGlobalSection
EndGlobal
Sign in to answer