I’m trying to build a CI pipeline in gitlab, where I’m defining a set of stages (build, package, publish, release, notify) for a .NET core environment, but these commands seem to fail because in most of the .csprojects, the base imported projects are not found.
Here is an example of one of my projects and it’s .csproj definitions:
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)baseprojectsBaseProject.csproj" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
And I’m defining the command:
dotnet build root/MyProject.csproj -c Release
I’m pretty sure that following this command, the base solution dir has to be specified, or something else is missing that could not be found because I’m getting the following error message when the command is ran:
error MSB4019: The imported project “” was not found. Confirm that the expression in the Import declaration “baseprojectsBaseProject.csproj” is correct, and that the file e
xists on disk.
testko testkovski is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.