Visual Studio 2010 C++/Cli

Discussion in 'General troubleshooting' started by eurous, Feb 9, 2011.

  1. I have deployed an assembly written in C++/Cli in Visual Studio 2010 to my site. The assembly cannot be loaded, it produces the error message below.
    The assembly does not depend on any other of my assemblies. I have built and successfully deployed the assembly previously using Visual Studio 2008. Can you please confirm that the v100 platform toolset required by my assembly when built with VS2010 is available.

    Thanks

    Server Error in '/' Application.
    ________________________________________
    Could not load file or assembly 'BestPossibleCli.dll' or one of its dependencies. The specified module could not be found.
    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.FileNotFoundException: Could not load file or assembly 'BestPossibleCli.dll' or one of its dependencies. The specified module could not be found.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [FileNotFoundException: Could not load file or assembly 'BestPossibleCli.dll' or one of its dependencies. The specified module could not be found.]
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
    System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
    System.Reflection.Assembly.Load(String assemblyString) +28
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

    [ConfigurationErrorsException: Could not load file or assembly 'BestPossibleCli.dll' or one of its dependencies. The specified module could not be found.]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
    System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
    System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +591

    [HttpException (0x80004005): Could not load file or assembly 'BestPossibleCli.dll' or one of its dependencies. The specified module could not be found.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8950644
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
     
  2. Ray

    Ray

    Does this assembly need to be installed directly on the server or is this assembly Bin deployable?
     
  3. My assembly is deployed in my Bin directory.
     
  4. Ray

    Ray

    Is this a custom assembly? You said you built it so I'm not familiar with this assembly. So I do not even know if it is Bin deployable or if it needs to be installed directly on the server. The error is fairly straight forward. It states that the assembly or one of its dependencies are not found. Maybe the 'BestPossibleCli.dll' needs something else to be installed on the server or maybe 'BestPossibleCli.dll' was not compiled correctly. Either way the assembly it is referencing is something I have not seen before and if you created this file 'BestPossibleCli.dll' then you should know if it is looking for something else or requires something to be installed on the server.
     
  5. Is this a custom assembly?
    If by custom assembly you mean did I write it, then yes.

    You said you built it so I'm not familiar with this assembly. So I do not even know if it is Bin deployable or if it needs to be installed directly on the server.
    It is bin deployable

    The error is fairly straight forward. It states that the assembly or one of its dependencies are not found.
    I agree.

    Maybe the 'BestPossibleCli.dll' needs something else to be installed on the server
    I agree.

    or maybe 'BestPossibleCli.dll' was not compiled correctly.
    It was compiled and linked correctly.

    Either way the assembly it is referencing is something I have not seen before and if you created this file 'BestPossibleCli.dll' then you should know if it is looking for something else

    Dependency Walker tells me it need the following dlls:

    MSVCR100.DLL
    KERNEL32.DLL
    MSVCP100.DLL
    MSCOREE.DLL

    Are they installed?
     
  6. Ray

    Ray

    What are these dll files? What are they for?

    MSVCR100.DLL
    MSVCP100.DLL

    I don't think these are a part of the operating system.
     
  7. They are the Microsoft Visual C Runtime library for Visual Studio 2010.
     
  8. Ray

    Ray

    Sorry we do not have these installed on our servers.
     
  9. Why not?
     
  10. Ray

    Ray

    We typically only have the default dll's that come with the operating system. I believe the dll's you are looking for requires that Visual Studio be installed on the server itself, which I'm afraid we cannot do on a shared hosting environment.
     
  11. Ray

    Ray

    Sorry, as I stated for security, stability, standardization reasons we cannot install this "Microsoft Visual C++ 2010 Redistributable Package" on our shared hosting environment.
     
  12. Ray

    Thankyou for your help. I'd like to make a complaint about this ommission to someone in a senior position in Winhosts. Could you please advise me the process I need to follow.

    Thanks
     
  13. Ray

    Ray

    You can always open a ticket to our support department and ask for the customer support department. This will ensure it gets to the proper people. Also if you create a thread in the "Suggestion" portion of the community forum "http://forum.Winhost.com/forumdisplay.php?f=15" and request for the "Microsoft Visual C++ 2010 Redistributable Package" to be installed on the servers we may have other customers request for it.
    Keep in mind that we are in a shared hosting environment. And we are not on a web farm. Our web servers are stand alone servers hosting several sites. Therefore, we simply cannot install it on one server but all the other web servers we host. Furthermore, Microsoft continues to publish new versions of redistributable packages, therefore we will have to constantly installing and uninstalling these components to all of our web servers.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page