Closed NCHANL closed 2 years ago
I'll take a peek tonight. Sitecore 10.0.2 or Sitecore 10.2?
Thank you! It's Sitecore 10.0.2.
Hi @NCHANL
Synthesis doesn't actually use the UsedImplictly
attribute. This sounds incredibly familiar though, but I can't remember why.
Could you please check the following:
UsedImplicitly
. Maybe there's an older model or something with that attribute on it?I've attached an XML file (Sitecore.Assemblies.Platform.txt) that contains the official Sitecore file versions for 10.0.2. If you run the following powershell script (update the two variables at the top) it'll tell you if your bin folder is clean:
$targetsFile = 'C:\PATH\TO\Sitecore.Assemblies.Platform.txt' #CHANGE ME
$binFolder = 'C:\inetpub\wwwroot\MYSITECOREINSTANCE\bin' #CHANGE ME
$foundMismatch = $false
$xml = Select-Xml -Path $targetsFile -XPath "/Project/ItemGroup/SitecoreAssemblies"
$xml | %{
$officialVersion = $_.Node.FileVersion
$dllName = $_.Node.Name
if(!(Test-Path "$binFolder\$dllName")) {
Write-Error "Missing File '$dllName'"
} else {
$dll = Get-Item -Path "$binFolder\$dllName"
if ($dll.VersionInfo.FileVersion -ne $officialVersion) {
Write-Error "Version Mismatch for '$dllName'. Expected: '$officialVersion', Found: '$($dll.VersionInfo.FileVersion)'"
$foundMismatch = $true
}
}
}
Write-Host -ForegroundColor Green "Done!"
if ($foundMismatch) {
Write-Host -ForegroundColor Yellow "Some dlls in the bin directory do not match official versions"
} else {
Write-Host -ForegroundColor Green "The bin directory matches official versions"
}
Hi @blipson89
Thanks for the script, it helped a lot.
Unfortunately, I still get the same error after fixing the version on all the .dll's, and I do not use UsedImplicitly
anywhere in my code.
Do you have any other ideas as to what it may be?
Thanks in advance.
Hmmm. What version of Sitecore and Synthesis are you upgrading from? What other modules do you have installed other than Synthesis?
I am upgrading from Sitecore 9.0 to 10.0.2, and from Synthesis 9.0.1 to now 9.1.5. I am also using Unicorn (4.1.3) and Solr (8.4.0).
It worked before I started upgrading Sitecore, so maybe there are some modules that Synthesis started/stopped using that are causing these issues?
It is specifically from the Synthesis.Startup.config
, and the Synthesis.ControlPanel.config
that these problems occur, maybe they are calling an external module, where I have the wrong version?
Synthesis 9.1.5 is built against Sitecore 9 DLLs. The parts of the Sitecore API that Synthesis uses are really low-level and don't tend to change much between Sitecore versions, so every time Sitecore comes out with a new version, I test Synthesis against the newest version of Sitecore.
I've tested Synthesis against Sitecore 10.0.0 through 10.1.0. It's possible that maybe its interacting with something in your solution in a way that didn't break on my local.
What we can try is recompiling Synthesis against the Sitecore 10.0.2 dlls and seeing if that fixes the problem. Unfortunately, I won't be able to get to this until tomorrow evening. Once I've done that, I'll attach the updated NuGet packages to this ticket.
If you'd like to try this sooner, you can pull down the repo and try updating it.
Unicorn 4.1.3 has the UsedImplictly
attribute in it. It was removed in 4.1.6 (https://github.com/SitecoreUnicorn/Unicorn/issues/416)
While Synthesis is the one throwing the error, it's not the source. Could you try updating Unicorn to 4.1.6 or higher?
Thank you so much, that worked! I updated Unicorn to 4.1.6 and now the error is gone.
Glad I could help!
Hi, I am upgrading Sitecore and Synthesis to Synthesis 9.1.4 with Sitecore 10.0.2, and when the project is deployed I get a "Sitecore.UsedImplicitlyAttribute does not exist in Sitecore.Kernel" error. Synthesis is not supposed to use that method, as it has been deprecated. I have tried to downgrade Synthesis to 9.1.0.2, and run Synthesis without any custom code, but I still get the same error. I do not have any "UsedImplicitly"/"UsedImplicitlyAttribute" calls in my code. If I remove the Synthesis.Startup.config and the Synthesis.ControlPanel.config, then there is no error, in the way that I can access Sitecore, but I still cannot access /synthesis.aspx.
Here is the stacktrace:
Thanks in advance.