I update my freetextbox version into 3.3.0.22838. I don't know how to update it. i just copy paste my new version in bin.
And I get this error:
Could not load file or assembly 'FreeTextBox, Version=3.1.5.21298, Culture=neutral, PublicKeyToken=5962a4e684a48b87' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Line 1: <%# page language="C#" masterpagefile="~/Template/BackendTemplate.master" autoeventwireup="true" validaterequest="false" inherits="Backend_Modules_BookManagement, App_Web_wplihlju" title="Untitled Page" %>
Much thanks!
Double check your solution's reference to the assembly. Right-click > Properties > Specific Version should be set to False. That or drop the reference to the old one and add a reference to the new one. Either way you'll need to recompile. The first suggestion will solve it for all future versions however.
hallo it says on error that you used different version of control on build you should put version Version=3.1.5.21298 instead of version 3.3.0.22838...
or you should build your project with version 3.3.0.22838 and deploy all your project....
As you see in the error message FreeTextBox has a public key token and also a version number. when you add a dll as a reference to your application, it binds your application to this publick token key and version number.
so you need to remove your FreeTextBox dll from your application references and add reference to new version to correct your problem.
just open your solution, go to references of your application, remove the FreeTextBox reference. then right click on references and select add reference and then select your new FreeTextBox dll. after rebuild, every thing will go fine.
The loader cannot find the assembly that was referenced; see that you put your assembly in the application folder or GAC it.
Related
I have a solution with 2 projects
SharePoint.Project
WebPart
Elements.xml
WebPart.webpart
Web.Project
WebParts
WebPart.cs (NameSpace = Web.Project.WebParts)
SharePoint.Project includes a reference to Web.Project. The SharePoint.Project packages the output from Web.Project and deploys it to the GAC. After the solution is deployed both SharePoint.Project.DLL and Web.Project.DLL exist in the GAC and the web.config of my sharepoint site include a SafeControl that identifies the FullName of the assembly "Web.Project.DLL", the Namespace "Web.Project.WebParts", and the Type "*".
The Problem
Attempt to add the webpart to a page in sharepoint site gives me the error below
A Web Part or Web Form Control on this Page cannot be displayed or imported.
The type could not be found or it is not registered as safe.
You should check version number and publickeytoken of safe control dll. These property must be similar to dll deployed in GAC.
There might be another solution to this problem but what I ended up doing was create a WebPart.cs file in SharePoint.Project and having it derive from the WebPart.cs from Web.Project, and changing the Elements.xml and WebPart.webpart files to reference the WebPart.cs in SharePoint.Project
I had some code that referenced the Noesis.Javascript assembly (http://javascriptdotnet.codeplex.com) and had renamed the Noesis.Javascript.dll to Noesis.Javascript.0.4.dll. I referenced this file through Visual Studio, and when I launched my web app in the ASP.NET development server, I got this error:
Could not load file or assembly
'Noesis.Javascript.0.4' or one of its
dependencies. The located assembly's
manifest definition does not match the
assembly reference. (Exception from
HRESULT: 0x80131040)
I then tried to remove this reference and re-reference the older version of the library. I got the same error. I then tried to remove this reference entirely and comment out all code that used this library. I still get the same error. I have tried to explicitly close out the ASP.NET development server from its icon in the system tray, but this still occurs. I can find no reference of this assembly anywhere in my project now, yet the error persists. What might be happening? Is there some cache that I'm not finding? How can I resolve this error?
Go into the registry and set [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Refresh the page and the error output will show you which assembly has a dependency on Noesis.Javascript.0.4.
Check if "Noesis.Javascript.0.4" appears anywhere in your web.config file and remove it if it does. It might be in the <assemblies> part.
remove the reference and add it again. Please note that the two dll version must be same. Do not add any later version, if its get registered into your web.config, otherwise you need to remove from there too.
In my case, I added a wrong DLL. Instead of adding 64bit, I added 32bit.
Thanks,
I've been tearing my hair out over this one, and hopefully it'll be something simple that I'm too thick to work out for myself.
We've got a ASP.NET website (IIS7.5, Server 2008R2) that uses the wonderful DevExpress ASP modules. All was working fine until I had the bright idea of upgrading the modules from 10.1.4 to 10.1.7. Ever since, the site throws intermittent but regular errors that it:
Could not load file or assembly 'DevExpress.Data.v10.1, Version=10.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
All the .aspx files have similar register tags, e.g.:
<%# Register assembly="DevExpress.Web.ASPxEditors.v10.1" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
I updated the VS2010 project using DevExpress's own upgrader utility. There is no reference to v10.1.4 anywhere in the code - I've checked the .aspx files, web.config etc - and the web server has all the latest .DLL's on too. I've even moved the site to a complete new, virgin server, yet the error still occurs. Specifying the subversion number and public key in the register tag doesn't make any different.
I've iisreset'd, cleared out temporary files, rebooted etc, all to no avail. The really frustrating thing is the error isn't reproducible - sometimes it happens, sometimes it doesn't. Can anyone help me out?
In the solutionExplorer: switched to the File View and changed
CopyLocal = true
for all DevExpress assemblies both in the Server and ServerGenerated projects.
It resolves the issue for me.
Could you please try it and let me know if that helps?
Please make certain that the application's bin folder does not contain our old assemblies. Also, search your project for '10.1.4.0' substring and make sure that this string does not appear. If this does not help, you must be sure that your application does not reference a dll which references our old assemblies or which is residing in the bin folder. Finally, a good idea is to clear the Temporary ASP.NET Files Folder ("C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files")... I hope, this will be helpful.
I have a assembly made in another project (projA). Now I want to import this dll in another project (projB). How can I achieve this? This is what I've tried (in projB).
1 Put dll in same dir as my project. (the bin dir)
2 In web.config:
<assemblies>
<add assembly="projA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
This is the error I get:
Could not load file or assembly 'projA, Version=1.0.0.0, 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)
EDIT:
The point is that eventually the assembly reference must me added dynamically
EDIT 2:
The name of the assembly (and namespace) are stored in the database. The physical assembly (dll) is added (by installation) in projB. Now the code in projB must read the assembly name from the database and then add a reference to the dll which is added by installation.
Are all of projA's dependencies in projB? Usually I'd just add a reference from one project to another if they are in the same solution.
Edit:
If you want to add an assembly dynamically then maybe a service reference maybe something to consider. By dumping in projA's DLL into the bin that doesn't really give all the DLLs that it may require, thus there are ways to tie things together so that objects can be understood across systems, like web services using XML to give a common example.
My question back about adding an assembly dynamically is where would you get it from and can that part be automated to be part of projB as that is really the general solution to this kind of problem.
Edit 2:
How could you get all of projA's dependencies? Is it possible to get it so that it doesn't depend on a bunch of other DLLs that may or may not be on the system that this is to run. That is what the error is telling you, that there exists some assembly projC that is also required. Note that this adding of assemblies can continue for a long time if there are many levels of dependencies used.
Summarizing the answer: What would you need to reference in order to load projA into some new project? That's your problem which without knowing what the dependencies look like is rather hard to answer directly.
You do not need to add anything in Web.config if the assembly DLL is in the Bin folder - you only need to do this if you are referencing an assembly that is in the GAC.
The error message you are getting is basically saying that the assembly can't be found in the GAC, which is presumably because it isn't there!
You don't need to manually add the reference in the web.config file. Right click on your project in the Solution Explorer window in Visual Studio and select 'Add Reference'. Go to the Browse tab and find the DLL you created in the other project, select it and click OK. Optionally, you can add the project A to the same solution as project B and then add the reference through the Projects tab of the Add Reference window.
The error
The located assembly's manifest
definition does not match the assembly
reference.
suggests that a DLL was found but did not match the version, or public key.
I would suggest double checking to ensure that the assembly reference matches the version information and that no rogue DLL's with old version numbers are located in the /bin paths or the GAC
Well, I guess to some extent it depends on what you are planning on doing once you've loaded the assembly, and what you've got in the assembly.
I'll assume you've got some sort of plugin architecture, with a known interface or base class that you're going to be calling methods on, lets say IPlugin.
Anyway, here's how to load an assembly dynamically, based on storing a reference to it in either a config section or a DB column somewhere:
private IPlugin LoadPlugin(string fullTypeName) {
Type type = Type.GetType(fullTypeName, false, true);
Object plugin = Activator.CreateInstance(type);
if (plugin is IPlugin) {
return (IPlugin) plugin;
}
// Handle the fact you've not got what you expected however you like
throw new ApplicationException(error);
}
So this will take a string such as "projA.PluginClass, projA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" load the assembly, and return you an instance of the class you're interested in.
You would then use it like this:
// Call to DB to get details of class and assembly
string pluginClass = GetPluginDetails();
IPlugin plugin = LoadPlugin(pluginClass);
// Call known method to do something on IPlugin
plugin.SomeMethod();
I'm using Licensed componentone product in my ASP.NET application and spcefically i use C1WebReport1 control from the product.while upgrading C1WebReport1 control from version 2.5.20072.239 to 2.6.20093.53207,i get the error message as
"Could not load file or assembly 'C1.Web.C1WebReport.2, Version=2.6.20093.53207, Culture=neutral, PublicKeyToken=594a0605db190bb9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
can any one help me to bring complete solution?
Thanks in advance.
Regards
Omprakash
It looks like the new (version 2.6.20093.53207) dll might not be in your bin folder. You can view the version of the dll by right-clicking, selecting properties and viewing the summary tab. Make sure you have the right version included in your project. If you have an old dll.refresh file I would delete it and also go into design view on the form that uses WebReport to regenerate the licensing files.
By the way, ComponentOne just released a brand new ReportViewer for ASP.NET you might want to try out too. If you have a license for 2009v3 you probably will qualify for the free upgrade!