.net Sdk - Compatibility With .net Framework 4.0 Follow
I'm trying to use the BarTender 9.4 print engine with an application that uses version 4.0 of the .NET Framework.
When I attempt to start the print engine, I get an exception.
Here's the code:
[code].
.
.
// Create and start a new BarTender Print Engine.
try
{
_engine = new Engine(true);
}
catch (Exception exception)
{
MessageBox.Show(this, exception.Message, AppName);
Close(); // Close this app. We cannot run without connection to an engine.
return;
}
.
.
.[/code]
Here's the exception:
[code]Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.[/code]
Can someone please tell me where I can get the .Net 4.0 compatible COM wrapper library for the BarTender 9.4 ActiveX automation library?
Best regards,
CG
31 comments

Shotaro Ito
Modifying the app.config should work to overcome the mixed mode exception.
To be sure it works you could try creating a file by the name of:
<appname>.exe.config
where <appname> is the name of the file. In this file place the contents as:
[xml]
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
[/xml]
For more information about the useLegacyV2RuntimeActivationPolicy flag see:
[url="http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx"]http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx[/url]
www.marklio.com/marklio/PermaLink,guid,ecc34c3c-be44-4422-86b7-900900e451f9.aspx
hope that helps!
Hi CodeGuru,
Modifying the app.config should work to overcome the mixed mode exception.
To be sure it works you could try creating a file by the name of:
<appname>.exe.config
where <appname> is the name of the file. In this file place the contents as:
[xml]
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
[/xml]
For more information about the useLegacyV2RuntimeActivationPolicy flag see:
[url="http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx"]http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx[/url]
www.marklio.com/marklio/PermaLink,guid,ecc34c3c-be44-4422-86b7-900900e451f9.aspx
hope that helps!
[/quote]
How can you guys not fix this? There should be no need for us to have to add this in the configuration file, this is just one more thing for a developer to worry about not to mention the side effect that this can bring about in other parts of your code that will be incredible difficult to debug.
Are there any plans to get rid of the need for this hack?
Thanks.
I ask once again, are you guys planning to fix this or is the hack the only solution Segull is willing to provide?
Thanks.
I'm sorry that I've replied late, and thank you for your suggestion to improve compatibility with the latest .net Framework.
I've asked to our development division.
At some point, we will upgrade BarTender to use 4.0, and this issue will go away. But we still support .NET framework versions less than 4.0. Right now, we have a product that works with 2.0, 3.0, 3.5, and 4.0 - but 4.0 requires additional configuration to use it.
Obviously it would be better for us to find a way to do it automatically, and we'll look at that for future version.
Could not load file or assembly 'Seagull.Interop, Version=9.30.0.0, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. The system cannot find the file specified.I am also getting this error .How can I resolve this issue ...........Please any one replay to me
I am using the .Net SDK from a .dll. I added a app.config file to the .dll and added the workaround code. I am still getting the problem. Then I added the workaround to the app.config file of the calling program (the program calling the .dll) and I am still getting this error. Please don't tell me that I can't use the .Net Sdk from within a .net 4 dll.
[/quote]
Any one from Seagull listening??
About DLL, I don't have enough knowledge to answer that, so I'm checking with Development division.
Hi,
Could not load file or assembly 'Seagull.Interop, Version=9.30.0.0, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. The system cannot find the file specified.I am also getting this error .How can I resolve this issue ...........Please any one replay to me
[/quote]
If not too late..
Make sure you have installed and Activated The version(9.3) of BarTender(with Printer Maestro, BarTender system service).
Check if .net Print SDK sample works properly on the same PC.
This post might helps..
[url="http://seagullscientific.invisionzone.com/index.php?/topic/81-cannot-load-seagullbartenderprintdll/page__view__findpost__p__150"]My link[/url]
At this moment, BarTender(10.0SR1 at this point) not support .net 4.0, so you still requires useLegacyV2RuntimeActivationPolicy setting.
About DLL, I don't have enough knowledge to answer that, so I'm checking with Development division.
[/quote]
Please respond to me as soon as possible. This is a critical app and needs to be delivered soon. If I need to find a workaround, I have to get on it ASAP.
At this moment, BarTender(10.0SR1 at this point) not support .net 4.0, so you still requires useLegacyV2RuntimeActivationPolicy setting.
About DLL, I don't have enough knowledge to answer that, so I'm checking with Development division.
[/quote]
I really need an answer on this .....
Build a DLL which references Seagull.BarTender.Print, with build setting of .net 3.5 Profile. No "web.config" in the project.
Create a caller application with .net 4.0 Profile. modify web.config to add <startup useLegacyV2RuntimeActivationPolicy="true">...
Note that .net Print SDK is 32bit(x86) project, so if you run the project on x64, set build target to x86 (not Any CPU).
Hope that helps.
Try
Build a DLL which references Seagull.BarTender.Print, with build setting of .net 3.5 Profile. No "web.config" in the project.
Create a caller application with .net 4.0 Profile. modify web.config to add <startup useLegacyV2RuntimeActivationPolicy="true">...
Note that .net Print SDK is 32bit(x86) project, so if you run the project on x64, set build target to x86 (not Any CPU).
Hope that helps.
[/quote]
When will this be fixed? It's not like .Net 4.0 was just released.
When will this be fixed? It's not like .Net 4.0 was just released.
[/quote]
Did the workaround above work?
Needless to say one day it need to be changed, however I cannot tell when that is going to be happen at the moment.
The concern is, once .net SDK is moved to .net 4.0, it would lose compatibility with .net 2.0 - 3.5 project, that also lose compatibility with Visual studio 2005 - 2008, which still widely being used.
I understand the importance of this issue and push it once again in feature request.
Did the workaround above work?
Needless to say one day it need to be changed, however I cannot tell when that is going to be happen at the moment.
The concern is, once .net SDK is moved to .net 4.0, it would lose compatibility with .net 2.0 - 3.5 project, that also lose compatibility with Visual studio 2005 - 2008, which still widely being used.
I understand the importance of this issue and push it once again in feature request.
[/quote]
First, I appreciate the response, even though it is not what I want to hear. All new development is being done on .Net 4.0 plus. So you are really hindering new development. Because the nature of the beast in component development, and the importance of legacy apps, you need to support both 2.0 and 4.0. All of the other component developers do this. If you don't embrace the new, your base will never grow and probably will shrink as other solutions provide what your not.
I will be testing the work around today.
MAJOR issue. There should be no excuse to not having a .Net 4.0 SDK. Sorry, but I have wasted alot of time.
Thanks.
Again, have you made any effort?? If not, the Bartender SDK may not be the way to go long term if you are not committed to the SDK.
Ian, any progress to report on this issue? This thread was started 19 months ago and the reply then was the same as the last reply .. "We're committed, but ...."
The response is still the same I'm afraid. This will happen when we judge the time is right for the majority of our customers. I don't know when this will happen exactly, but it is nearer than when you last asked for it.
So does the 10.1 release now support a .Net release higher than 2.0?
Please sign in to leave a comment.