My Photo

Microsoft Dynamics 365

Official Blog for Microsoft Dynamics Functional and Technical Solutions....
Browsing Category " in C# "

Could not load file or assembly 'Microsoft.Bot.Connector, Version=3.12.2.4, Culture=neutral, PublicKeyToken=##' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Could not load file or assembly 'Microsoft.Bot.Connector, Version=3.12.2.4, Culture=neutral, PublicKeyToken=##' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Error 


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Bot.Connector, Version=3.12.2.4, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)



Reason

 Microsoft.Bot.Builder library got update to Version=3.12.2.4

Resolution

Update the Microsoft.Bot.Builder library to latest version

Right Click on your Project and Click on manage NuGet Packages


Search for Microsoft.Bot.Connector and click on update  


Then press on accept




Hope It helps

Happy Coding 😊

SOURCE : mscrm.com

Entity for Views in CRM based on View Ownership - SavedQuery and UserQuery Entity

There are 2 types of View in CRM entity based on View Ownership , which are stored in two different entities.

1)  Organisation or System View - stored in the View Entity (SavedQuery)
2)  Individual, personal or User/Team View - stored in the Saved View Entity (UserQuery)

Below is the Fetch XML that you can use to retrieve the Data of the entites

1)  Organisation or System View
<fetch top="5000" >
  <entity name="savedquery" >
    <attribute name="name" alias="ViewName" />
    <attribute name="createdbyname" alias="Owner" />
    <attribute name="description" alias="Description" />
    <attribute name="returnedtypecode" alias="returnCode" />
    <attribute name="fetchxml" alias="fetchXML" />
  </entity>
</fetch>

2)  Individual, personal or User/Team View
<fetch top="5000" >
  <entity name="userquery" >
    <all-attributes/>
    <attribute name="name" />
    <order attribute="name" descending="false" />
    <attribute name="ownerid" />
    <attribute name="modifiedon" />
    <attribute name="userqueryid" />
  </entity>
</fetch>

We can retrieve the data of these entries by C# also you can see the full code example here:
https://msdn.microsoft.com/en-us/library/gg594431.aspx

You can also use LINQ query for retrieving these view.

Happy CRMing 😊

ERROR : Package/Publish task Microsoft.Web.Publishing.Tasks.CreateProviderList failed to load Web Deploy assemblies. Microsoft Web Deploy is not correctly installed on this machine. Microsoft Web Deploy v3 or higher is recommended. while publishing web application

Hi I got below error while publishing a web application .


Error : Package/Publish task Microsoft.Web.Publishing.Tasks.CreateProviderList failed to load Web Deploy assemblies. Microsoft Web Deploy is not correctly installed on this machine. Microsoft Web Deploy v3 or higher is recommended.

It resolved after downloading web platform installer and installing web deploy V3 or higher .

1. download Web Platform Installer .



2. After installing search  WEB DEPLOY in search Box

3. Add web deploy and click Install .


Now Publish the project , it will be done successfully . Hope it help .

Thanks




f


SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

Get / Retrieve all Entity Metadata from an organization in MSCRM 2011, 2013 ,2015 usin C#

Below Code Retrieve all entities , who's Responce can be used to bind entities to drop down or grid etc .




 RetrieveAllEntitiesRequest req = new RetrieveAllEntitiesRequest();
            req.EntityFilters = EntityFilters.Entity;

            RetrieveAllEntitiesResponse resp = (RetrieveAllEntitiesResponse)service.Execute(req);

            foreach (var entity in resp.EntityMetadata)
            {
                //bind it with dropdown ETC
                entities.Items.Add(entity.LogicalName);


            }

Hope This Helped You Thanks For the Support , If Any query or suggestion , please comment below



SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012