which .Net framework support interop . redemption dll ver=5.18? - c#

when i am setting Target .Net Framework to 3.5 and build the solution, it was showing [System.Bad_Image_Format Exception:'Could not load file or assembly 'interop.Redemption,Version=5.18.0.0'']

Interops are version agnostic. You need to re-add the reference to the project. Make sure the bitness of the reference assembly corresponds to your project's one.

Related

ComponentOne dlls not being loaded

I am creating an API-Addin for a Program that uses .NET Framework 4.7.2 and I cannot change that. I am adding the ComponentOne (.NET 4.5.2) DLLs in Visual Studio. When the Addin in the external program tries to load the dll, there is an error that the DLL cannot be found. I am pretty sure this problem is caused by the different .NET Framework versions. Is there any workaround which could help when loading DLLs with lower .NET versions?
I managed to find a solution where I manually load the DLL before it is referenced. I used the Assembly.LoadFrom(assemblyPath) function.
https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.loadfrom?view=net-6.0

C# "System" version update

I'm in C# in Visual Studio running 2015 Update 3.
I'm using a dll that I made myself for the backend of a system, and in the references of the project, one shows the "System" as Version 2.0.5 and the project being used as a dll shows it as 4.0.0. I believe this is the cause of a conflict that is preventing me from running this app. How do I update just the system version or even specify it so I can make them the same?
I think you should go to the references of your project containing the old reference, remove System and add it with version 4.0.0.0. However, you should also check that target .NET framework versions match (maybe the older dll is obtained compiling against .NET framework 2.0 and the newest one against .NET framework 4.0).
In order to find out the cause that is preventing you from running the application (you should provide what is happening), an useful tool is Assembly Binding Log Viewer which will show the exact assemblies that the application is trying to load (fully qualified assembly names).

Referenced Nuget package has errors finding system types

I have several strange errors after using NuGet to add a third party library to a project. The project targets .NET 4.5.2.
The errors I get complain of standard system types not being of the correct version
e.g.
CS0012: The type 'System.Collections.Generic.IEnumerable`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I have cleaned the project folder, deleted the bin folder, reinstalled the
NuGet package and readded the reference to no avail.
The library is Remotion.Linq
According to the Registry the following .NET versions are installed on the machine
v2.0.50727 2.0.50727.4927 SP2
v3.0 3.0.30729.4926 SP2
v3.5 3.5.30729.4926 SP1
v4
Client 4.6.01038
Full 4.6.01038
v4.0
Client 4.0.0.0
Does anyone know what is happening here?
This suggests the third party library targets 4.0 of the framework. You either need to find a later version of the library or in your project properties set the target framework to 4.0 as opposed to 4.5
This turned out to be a misleading error. The library was built against .NET 4.5.2 but I had .NET 4.5.1 installed.
Microsoft explain this in a KB article (KB2971005) but you really need to know what the issue is to easily find the article. I somehow stumbled across it after a lot of searching.
The resolution is to install the updated version of the Microsoft .NET Framework 4.5.2 Developer Pack.

Mono.TextEditor not working. What am I doing Wrong?

I am trying to use the Mono.TextEditor assembly with .NET Framework 3.5 in GTK#. But I keep getting System.BadImageFormatException
Could not load file or assembly 'Mono.TextEditor, Version = 1.0.0.0,Culture = neutral,
PublicKey Token = null' or one of its dependencies. This assembly is built by a runtime
newer than the currently loaded runtime and cannot be loaded.
The MonoDevelop version I am using (Mono.TextEditor is an addon of MonoDevelop) is definitely built by .NET version 3.5. Any Help?
Most possibly your project still targets the 2.0 runtime.
You'll need to set Project/Settings/Build General/Runtime: Mono / .Net 3.5 in monodevelop.
Don't forget to add the reference to System.Core, if it isn't already added.

Do the assemblies in Add Reference dialog differ depending on .Net framework used?

I'm curious - does the listing of assemblies in the Add Reference dialog vary depending on the version of the .Net framework used for the selected project. If they do differ, I'd love to know where the differences lie. Thanks!
The list of assemblies is directly tied to the .net version in use in the current project. The assemblies that cant be used are greyed out. See the section "References List Depends On .NET Framework Target" here:
http://msdn.microsoft.com/en-us/library/ftcwa60a(VS.90).aspx
This is only relevant in VS2010. There is only one version present of the .NET assemblies for .NET 2.0 through 3.5SP1. Your project will simply reference the one and only version of such an assembly. The Framework Target setting just prevents you from adding references to assemblies that are not present in the selected version.
That's very different in VS2010 since it supports .NET 4.0. That is a version that can be installed side-by-side with previous versions of .NET. Your list of assembly reference now do change if you select between .NET 4.0 and an earlier version in your Framework Target setting. It is subtle, only the Version property in the Property Grid changes.
The assemblies listed are different depending on the framework version of your Project as defined in the Properties of your project.
For instance if you define your project to use .net 3.5 you will be able to add System.Linq but if you use .net 2.0 you will not.
You can probably see what the dirrerences are in a Whats new in .net 3.5/4.0 article
Assemblies that were compiled to a later framework than you are using are not included. Also they must be .NET assemblies. If you have a C++ project in your code you can not include that dll in your references. If you want that dll in your bin you can do something like add existing item, add the dll as a link and set the copy newer property. Keep in mind though that this method does not cascade up.

Categories

Resources