Could not load file or assembly ‘Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified or Deploying custom web application inside ISV folder of CRM 2011


To deploy our custom web application inside ISV folder of CRM 2011 we need to follow the below steps

Make following changes in the web.config

<configuration>
<configSections>
<remove name=crm.authentication />
</configSections>
<system.web>
<httpModules>
<clear/>
</httpModules>

……………………

And after deploying the application within the ISV folder, place the following dlls within its bin folder

  • AntiXssLibrary.dll
  • Microsoft.Crm.dll
  • Microsoft.Crm.Sdk.dll
  • Microsoft.Crm.Platform.Sdk.dll

We can find these dll’s inside

../Microsoft Dynamics CRM/Server/Bin folder.

The above solution worked perfectly for Beta Versions of CRM 2011.

Recently we upgraded to RTM, and we had to deploy a WCF Service and custom web site inside isv.

For WCF service we had to make following changes to the web.config apart from the changes mentioned above

<serviceHostingEnvironment aspNetCompatibilityEnabled=”false”>
</serviceHostingEnvironment>
</system.serviceModel>

And in case of custom web site we had to add the following additional dll’s

  • Microsoft.Crm.Sdk.Proxy.dll
  • Microsoft.Xrm.Sdk.dll

Hope it helps!

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

43 thoughts on “Could not load file or assembly ‘Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified or Deploying custom web application inside ISV folder of CRM 2011”

  1. Hi Nishant,

    I did what you said but still I am getting the same error:

    Could not load file or assembly ‘Microsoft.Crm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

    Here it is my web.config.

    <!–
    The section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.

    –>

    <!–
    The section enables configuration
    of what to do if/when an unhandled error occurs
    during the execution of a request. Specifically,
    it enables developers to configure html error pages
    to be displayed in place of a error stack trace.

    –>

    Let me give you some history about what I did:
    1) I have a tool (magicQuestionnaire) running for CRM 4.0 inside many IFrames
    2) I upgraded the environment to CRM 2011
    3) I upgraded my project to VS 2010, .Net 4
    4) I changed the web.config to include the entries you suggested
    5) I Built the project to ISV/magicQuestionnaire Web Application
    6) I got the warning “The element ‘configSections’ has invalid child element ‘remove'” but I am ignoring it
    7) I published the project to the ISV/magicQuestionnaire folder as I was doing before in CRM 4.0
    6) I copied the three dlls from CRM 2011 bin folder to ISV/magicQuestionnaire/bin folder

    What I am doing wrong? Please help me.

    Also, I noticed that I get the same error if I try to change the project to release and build it. It fails with the same error message. It only rebuild if I leave the project as debug

    Thanks in advance,

    Luiz

    Like

    1. Hi ,
      What steps have you followed for deploying your application and what error are you getting ?

      Try the steps mentioned in the post with some other simple web application first. If it succeeds then try with your application.

      Regards,
      Nishant Rana

      Like

  2. Hi Nishant,

    I deployed the application using VS (Publish). The error is the same you solved: Could not load file or assembly ‘Microsoft.Crm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified

    I started an application from scratch. This time I didn’t convert from 4.0. I did a new one using CRM 2011 and VS 10. I got the same error.

    Regards,

    Luiz

    Like

    1. Hi Luiz,
      When i am doing it, it is working absolutely fine for me.
      I am also creating a new blank website, simply adding a default.aspx page in it.
      And then publishing it inside ISV folder of CRM.
      After publishing just placing the above mentioned dll’s inside the bin folder.

      Regards,
      Nishant Rana

      Like

  3. In our case the three DLLs aren’t enough. We had to copy the following DLLs for the Custom-Page to run inside the CRM Website (with its own VDir and NET4/Classic AppPool):

    AntiXssLibrary.dll
    Microsoft.Crm.Admin.AdminService.dll
    Microsoft.Crm.ADUtility.dll
    Microsoft.Crm.dll
    Microsoft.Crm.ObjectModel.dll
    Microsoft.Crm.Platform.Sdk.dll
    Microsoft.Crm.Platform.Server.dll
    Microsoft.Crm.Sdk.dll
    Microsoft.Crm.Tools.ActiveDsWrapper.dll
    Microsoft.Crm.Tools.Admin.DMSnapinLib.dll
    Microsoft.Crm.WebServices.dll

    (in addition to the SDK DLLs:
    microsoft.crm.sdk.proxy.dll
    microsoft.xrm.sdk.dll)

    What I would be interested to know is if there is a better way to solve this issue since you have to keep in mind that CRM Updates might change those DLLs.

    Like

    1. Hi Luiz,

      Let me know how can I help you.
      Putting those dlls in the bin worked for me, that’s why I had suggested it on my blog.
      But as you can see somebody mentioning in comment to the post that he had to put some other dlls as well to get things working.

      Earlier I used to get error on deploying application inside ISV, however in one of the developers forum, I saw someone suggesting to put all the dlls of the server/bin folder of crm to the bin folder of the custom web application. Give that a try as well.

      Regards,
      Nishant Rana

      Like

  4. It’s working when,

    I added the tag in web.config

    and added following dlls in application bin folder

    •AntiXssLibrary.dll
    •Microsoft.Crm.dll
    •Microsoft.Crm.Platform.Sdk.dll

    Like

  5. It’s working when,

    I added the tag in web.config

    and added the dlls in application bin folder
    •AntiXssLibrary.dll
    •Microsoft.Crm.dll
    •Microsoft.Crm.Platform.Sdk.dll

    Like

  6. It’s working when,

    I added the httmodule clear tag in web.config
    and added the dlls in application bin folder
    •AntiXssLibrary.dll
    •Microsoft.Crm.dll
    •Microsoft.Crm.Platform.Sdk.dll

    Like

  7. Hey itvti,

    It’s just like Nishant posted.
    I had the same problem as you until I realised that I forgot to state the

    below the system.web tag.
    This clears the settings of the machine.config and doesn’t request all these dlls anymore.

    Thorsten

    Like

  8. Well, I am not a developer but I got to deploy a project which actually send fax using the fax services on windows 2008 server 64bit. the project was developed on a windows 32bit platform and I was setting all the information according to the given instruction but still I this annoying error and then I found the solution and that was to change the platform from anycpu to x86 and it worked. for a complete setting list please follow the link below:
    http://www.sizledcore.com/2011/10/could-not-load-file-or-assembly/

    Like

  9. i am getting handler error when executing the button click event when the web page is deployed to ISV folder. But when the page is hosted as separate application it runs correctly. Please let me know why it behaves like this.

    Like

  10. I’m trying to put WCF data service in ISV folder. That service need to access other database for integration purpose. I followed all the steps and it’s keep on asking user name and password when I browse that service. After three times of asking credential it’s shows blank. Any idea on that?? Please help me. Thanks in advance.

    Like

  11. I have a question. I have a web application hosted in side the ISV folder, my installation is claim configured, when accessing the page from isv folder i get the error page not found. What should be the reason…? im not able to solve the isuse….

    Like

  12. Fantastic goods from you, man. I’ve understand your stuff previous to and you’re just extremely great.

    I really like what you’ve acquired here, certainly like what you are stating and the way in which you say it.
    You make it enjoyable and you still take care of to keep it wise.
    I cant wait to read much more from you. This
    is actually a great website.

    Like

  13. Hello it’s me, I am also visiting this site regularly,
    this website is really fastidious and the people are in fact sharing fastidious thoughts.

    Like

  14. It’s the best time to make some plans for the future and it is time to be happy.
    I’ve read this post and if I could I wish to suggest you
    some interesting things or advice. Maybe you could write next
    articles referring to this article. I want to read
    even more things about it!

    Like

  15. Nice post. I learn something new and challenging on blogs I stumbleupon every day.
    It’s always exciting to read articles from other writers
    and use something from their sites.

    Like

  16. This is the perfect web site for everyone who hopes to find out about this topic.
    You realize so much its almost hard to argue with
    you (not that I personally would want to…HaHa).

    You certainly put a new spin on a topic which has been discussed for years.

    Great stuff, just excellent!

    Like

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Dynamics 365 Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog

Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Knowhere365

Specific topics by Django Lohn on the whole Microsoft365 Stack

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue MVP

A Microsoft Business Applications MVP

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.

CRM Keeper

Dynamics 365 Customer Engagement, CRM, Microsoft CRM, Dynamics CRM