I need some help. I need to publish my ASP.NET Core Web API to an Azure app service. I am getting the error while publishing.
I am using Target Framework .NET Core 2.1 in the Main
project and data layer class library.
Error :
InvalidConfigurationMessageText = The OutputPath property is not set for project 'CoreDataLayer.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'.
This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.
Main project file :
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<_HasReferenceToSystemRuntime>true</_HasReferenceToSystemRuntime>
<UserSecretsId>acb71015-f783-4442-90c2-3f2aaff100c6</UserSecretsId>
<StartupObject>NIOXDashboard.Program</StartupObject>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Latest|AnyCPU'">
<PlatformTarget>AnyCPU;x86</PlatformTarget>
<OutputPath>bin\Output</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CoreDataLayer\CoreDataLayer.csproj" />
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
</Project>
DataLayer Project file :
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.90" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
</ItemGroup>
</Project>
Model Project file :
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
</Project>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
try this change – MD. RAKIB HASAN