September 2004 - Posts

http://support.microsoft.com/default.aspx?kbid=842907

 

Posted by taganov | with no comments

 I was installing a managed Office application on a client's machine. I had gone through all the cumbersome steps to setup the security to work from a network share, etc., etc..  I kept getting the following error:

Assembly Cannot Be Found
This causes the following error message:
The assembly <assemblyname> could not be found at <path> or could not be loaded.
You can still edit and save the document. Contact your administrator or the author of this document for further assistance.

I did some digging around on Microsoft's VSTO Troubleshooting Page , and found this: 


Assembly Cannot Be Found
This causes the following error message:
The assembly <assemblyname> could not be found at <path> or could not be loaded.
You can still edit and save the document. Contact your administrator or the author of this document for further assistance.

There are a number reasons that this error could occur:

  • Check that the user has access to the assembly location and that the named assembly exists. For more information, see Assemblies in Office Projects.
  • You might have changed the name of your assembly (which is used as the project namespace by default) or the name of the class (by default named OfficeCodeBehind). If you do this, you must manually update the Office integration attribute in the project template code to use the new names and then recompile your solution. Specifically, you must change the Class=<namespace>.<classname> statement:
    <Assembly: System.ComponentModel.DescriptionAttribute( "OfficeStartupClass, Version=1.0, Class=<namespace>.<classname>")>
  • If this error is raised by a document that was created from a template, the path to the assembly might still be the relative path from the template. When you create a document from a Word template, by default the path in the custom property _AssemblyLocation0 is relative to the original template. If the user saves the document in a different location, the document will not find the assembly unless the assembly is copied to the new relative location.

    For information on changing the assembly path manually, see How to: Link an Assembly to a Word or Excel File. For a code example that changes the property from relative to absolute, see Code: Change the Assembly Path from Relative to Absolute in a Document (Visual Basic), or Code: Change the Assembly Path from Relative to Absolute in a Document (C#).

    For information on the custom properties, see Word and Excel Project Properties


Allow me to add to this list one more problem that can cause this error:  the target machine does not have the Office 2003 PIA's installed.  This is not documented anywhere that I can find, so I post it here.

Cheers!

So here's a question:

Has anyone successfully been able to develop a .NET assembly that can be shared between multiple Compact Framework applications. Further, has anyone been able to write a .NET assembly that could be shared between a mobile device and a desktop application?

Posted by taganov | 2 comment(s)
Filed under: ,

I've been wondering about the general development experience of the .NET developers' world.  Here's a short list of questions that I would appreciate answers to:

  1. Do you use the Visual Studio Database Project integrated with Source Control to manage changes to a database?
  2. How do you think Java compares to .NET for Windows application development?
  3. How do you think Java compares to ASP .NET for web application development?
  4. Do you build your own deployment packages, or do you use a 3rd party tool such as Wise?
  5. How do you think PVCS compares to Visual Sourcesafe for a) reliability, b) speed, and c) integration with Visual Studio?
  6. Do you think your company has a good set of software development methodologies in place?

Thanks.

Posted by taganov | 7 comment(s)
Filed under:
More Posts