Dynamics 365 (on-premises) v8.2 upgrade to v9 fails - dynamics-crm

I am trying to upgrade Dynamics 365 version 8.2.3 to version 9.0, but have some problems with it.
I've tried two scenarios on my test server:
Created backup of my real CRM database (XXXXXX_MSCRM)
Restored it on the test server.
Installed version 9.0 on the test server. Installed the latest update for it.
Did Import Organization on restored database (XXXXXX_MSCRM) via Deployment Manager. It failed.
As a result, importing failed with this exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The constraint 'PK_topicmodelBase' is being referenced by table 'TopicModelExecutionHistoryBase', foreign key constraint 'topicmodel_topicmodelexecutionhistory'.
Created backup of my real CRM database (XXXXXX_MSCRM)
Restored it on the test server.
Installed version 8.2 on the test server.
Did Import Organization on restored database (XXXXXX_MSCRM) via Deployment Manager. It succeeded.
Installed the latest update for version 8.2. It succeeded.
Installed/Upgraded Dynamics 365 to version 9.0. It failed.
During the installation it also tried to upgrade Organization version to 9.0 and failed. So, server version 9.0 is installed, but my organization is in Failed state.
Explored the log file and got this exception:
System.Exception: Action Microsoft.Crm.Tools.Admin.InstallCrmSystemConvertedSolutionsAction failed. ---> Microsoft.Crm.PackageDeployment.PackageDeployerException: Package msdynce_MarketingSales failed to install on attempt 1.
System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerImportException: PackageDeployerWrapper: Import Failed status encountered. Details: Failed to load solution Marketing Sales Patch, version: 9.0.4.3602
and also a bunch of this kind of inner exceptions:
Error : The AttributeLookupValue (Id=81cde1dc-2241-db11-898a-0007e9e17ebd) entity or component has attempted to transition from an invalid state: ComponentStateName: Solution; ComponentOperation: Delete; ComponentSolutionType: Active; SolutionOperationContext: MoveSystemComponentToFirstPartySolution; IsProtected: False; FinalComponentState: Publish.
Did anyone faced with such a problems during the upgrade process?

Ok, I have successfully upgraded Dynamics 365 and my organization to version 9 with the second scenario.
Here is my solution:
First of all, my Dynamics 365 version and real organization's version (let's call it "RealOrg") was of version 8.2.3.8.
1. Install the latest update for Dynamics 365 8.2 (Update 2.15). No problem with it, everything should work fine. So we got 8.2.15.2 version.
2. Now we need to run setup of version 9. At the start of the installation we must choose some organization which will be upgraded to the new version <-- so here is the problem part. Whatever organization I choose, after upgrading it to v9 it will be always in Failed status, so I will lose it. What I did is created new organization via Deployment Manager, lets call it "FakeOrg" then I chose this organization to upgrade it to version 9. After that, we are able to manually upgrade "RealOrg" at any time after v9 installation.
3. Upgrade should perform successfully, despite the fact that it can show exception message (this exception probably refers to organization upgrade). So now we got "FakeOrg" of version 9.0.2.3034 with Failed status (we don't need it anymore) and "RealOrg" of version 8.2.15.2 with Disabled status, but we can see that Update option is available for "RealOrg".
4. It is important do not update "RealOrg" to new version at this step, because it will try to update organization to 9.0.2.3034 version which is pretty buggy and it will fail. We need to install first update for Dynamics 365 9.0 (Update 0.3). It performs with no problem. So now we have version 9.0.3.7.
5. We finally can manually upgrade our "RealOrg" from version 8.2.15.2 to version 9.0.3.7. It took around 2-3 hours for me, but worked fine with no problem.
6. After all, another problem I faced was this exception when I tried to access Dynamics 365 website:
Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies
The reason of this exception is absence of report viewer .dll-s in website bin folder.
Solutions is to copy 7 .dll files from version 9 installation extracted files (you should extract files before running the setup of v9)
Copy these files:
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.DataVisualization.dll
Microsoft.ReportViewer.Design.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WebDesign.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll
Into this folder
C:\Program Files\Microsoft Dynamics CRM\CRMWeb\bin

Related

Error installing SQL Server Express on Windows 10 Home 21H2, 19044.1526 - Unauthorized operation

I hit the same error again and again when trying to install SQL Server Express 2019 (or older versions on two different Windows 10 Home 21H2, 19044.1526 PC's.
I get this error:
Feature: Database Engine Services
Status: Failed
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x84BB0001
Error description: Attempted to perform an unauthorized operation.
Error help link: https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=15.0.4013.40&EvtType=0x48BB60BC%400xBB814387&EvtType=0x48BB60BC%400xBB814387*
Microsoft has an KB article https://learn.microsoft.com/en-us/troubleshoot/sql/install/error-set-up-update-instances about upgrading the Edge Chromium version. It is up to date, and I have tried installing Edge using a standalone installer also.
The registry subkey in mention: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge simply does not exist.
I try installing with a minimum of features. But the error appears with installing the database engine, which is hard to live without.

Auto deployment for Microsoft 365 Apps update fails with error code 0x87D20417 - SCCM

Our ADR for the latest Microsoft 365 Apps fails with error code 0x87D20417. The update in question is:
Microsoft 365 Apps Update - Monthly Enterprise Channel Version 2008 for x64 based Edition
Microsoft 365 Apps Update - Monthly Enterprise Channel Version 2008 for x64 based Edition
The ruleengine.log states the following:
Failed to download the update content with ID 16933834 from internet. Error = 13875 SMS_RULE_ENGINE Failed to download ContentID 16933834 for UpdateID 16996246. Error code = 13875 SMS_RULE_ENGINE
Failed to download the update content with ID 16933835 from internet. Error = 13875 SMS_RULE_ENGINE
Failed to download ContentID 16933835 for UpdateID 16996248. Error code = 13875 SMS_RULE_ENGINE
Failed to download any update SMS_RULE_ENGINE
Failed to download update contents. SMS_RULE_ENGINE
I've tried to search for a solution and so far I haven't been able to find out a fix for it. Some are saying it has something to do with certificates, others say with file permissions.
This rule has worked without any issues in the past.
It turned out to be a known issue with the 2020-10 update. Uninstall the October update then reboot
https://learn.microsoft.com/en-us/answers/questions/136944/failed-to-download-content-id-error-invalid-certif.html

DEP0600: Deployment failed. XmlException – Data at the root level is invalid

When I deploy a UWP from VS 2017, I’m seeing the following error:
DEP0600: Deployment failed. XmlException - Data at the root level is invalid. Line 24, position 11.
Any clues on how to resolve?
After much debugging and Binging, an SDE pointed out that I was hitting a known bug in Windows 10 Creators Update – which will be fixed in the upcoming Fall Creators update. At install time, all of the installed package are enumerated to see if the package has already been installed. This enumeration fails if the installed app’s AppxManifest.xml file is malformed.
I had several test apps installed on my machine, some deployed with Visual Studio, some installed with PowerShell using the command:
Add-AppxPackage -Register .\PackageLayout\AppxManifest.xml
After uninstalling several of the test apps, I was able to deploy my app with Visual Studio 2017 without problems.

Unable to upgrade from 9.x to 10.x

I am a teamcity developer and our organisation currently uses Team-city 9.0.3 Free version. Now we maxed out Builds. So we are planning to take an enterprise edition.
But before that we need to upgrade the teamcity to latest version 10.x. while i am doing the upgrade it throws the following error.
Please click the link to see the error
The steps i did for the upgrade are
-- Take a back up of entire Teamcity which will be in /root/.BuildServer/backup
-- Stop the Teamcity server and delete the whole teamcity directory
-- copy the backup .Zip file into import section.
-- download the latest teamcity and do the necessary configurations and start the teamcity server.
-- go to Administration/Import and start importing the file from /root/.BuildServer/import
While importing i am getting the above error as version is not supported.
Please help me on this so that i have to upgrade the Teamcity and go for enterprise edition
Thankyou in advance..
It sounds like you are trying to import a backup created with TeamCity 9 into TeamCity 10, that isn't supported, backups can only be restored with the same version they were created with.
When you install TeamCity you usually have a data directory (probably ".BuildServer" in your case) and the software in a different location. You shouldn't delete the data directory, you should upgrade the database and data directory in place (TeamCity will prompt to do this when the new software starts, refer maintenance mode below).
If you continue with your proposed route you'll need to create a fresh TeamCity 10 database with the new schema version, however you'll loose all the other settings and data as that backup sounds like a project config only backup.
JetBrains provide detailed guides to perform upgrades:
https://confluence.jetbrains.com/display/TCD10/Upgrade
https://confluence.jetbrains.com/display/TCD10/TeamCity+Maintenance+Mode

TeamCity 9.1.1 upgrade not working

I'm currently using TeamCity 9.0 with MS-SQL as the repository. I want to upgrade to version 9.1.1. I run the installer and I see 9.0 being uninstalled, followed by the 9.1.1 installation. After the installation is done TeamCity won't come back. The Web portal shows this error:
TeamCity server is connecting to MSSQL database. The database server is not started yet, or the database specified in '/config/database.properties' file is inaccessible.
I am using the same user account as the previous installation so it doesn't look like a permissions issue.
According to the documentation the installer should prompt for the data directory, but I never got that prompt.
While uninstalling I removed the TeamCity/lib/jdbc folder (those are the libraries to use MS-SQL). After installing 9.1.1 I copied back the folder and restarted the TC service.
Thoughts?
Check your config/database.properties file, and see if your database is still there.

Resources