0

I have recently installed a fresh version of Sitecore 9 update 2. After installation when I updated my project's Sitecore nuget packages, all my Sitecore.Kernel.NoReferences targeted to .NET4.5.2. All other Sitecore packages are in .NET4.6.2. What could be the reason behind that?

<Reference Include="Sitecore.Kernel, Version=11.1.0.0, Culture=neutral, processorArchitecture=MSIL"><HintPath>..\..\..\..\packages\Sitecore.Kernel.NoReferences.9.0.171219\lib\NET462\Sitecore.Kernel.dll</HintPath> </Reference>

to

<Reference Include="Sitecore.Kernel, Version=11.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\..\..\packages\Sitecore.Kernel.NoReferences.9.0.180604\lib\NET452\Sitecore.Kernel.dll</HintPath> </Reference>

0

I recently had the same issue, what i had to do is clear Nuget cache in Visual Studio, (Similar to Gatogordo referenced answer) by going to :

Visual Studio->Tools->Nuget Package Manager-> General then click on Clear ALl Nugets Cache

After that you need to re-install the sitecore package using Package Manger Console to enforce the new target (.Net 4.6.2):

Update-Package Sitecore.Kernel.NoReferences  -Reinstall -IgnoreDependencies

This will force all of your projects to re-target the right .Net framework (From 4.5.2 --> 4.6.2).

Not the answer you're looking for? Browse other questions tagged or ask your own question.