Rasolo
Search

Start | Blogs | Umbraco | Namespace umbraco not found

2019-10-30

Umbraco

Namespace name 'Umbraco' could not be found solution

Error message:

Error CS0246: The type  or namespace name 'Umbraco' 
could not be found (are you missing a
using directive or an assembly reference?

I just tried to build my site after having added a few things, and an Umbraco update from version 8.2.0 -> 8.2.1 was one of them. Azure Pipelines could not build the site however, and eventually I figured out why:

The .Core project in my case had not had the hintpaths updated to point from 8.2.0 to 8.2.1 from the nuget installer. What I did was to copy paste the working hintpaths that the installer had fixed in the .tests project.

So from Rasolo.Tests.csproj I copied:

 <Reference Include="Umbraco.Core, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\UmbracoCms.Core.8.2.1\lib\net472\Umbraco.Core.dll</HintPath>
</Reference>
<Reference Include="Umbraco.Examine, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\UmbracoCms.Web.8.2.1\lib\net472\Umbraco.Examine.dll</HintPath>
</Reference>
<Reference Include="Umbraco.Web, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\UmbracoCms.Web.8.2.1\lib\net472\Umbraco.Web.dll</HintPath>
</Reference>
<Reference Include="Umbraco.Web.UI, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\UmbracoCms.Web.8.2.1\lib\net472\Umbraco.Web.UI.dll</HintPath>
</Reference>

And pasted it over the old references in the Rasolo.Core.csproj project.