Visual Studio 2012 Compatibility? 追蹤

0
Avatar
Legacy Poster

I just installed Visual Studio 2012 and started upgrading some of my applications from Visual Studio 2012. When I upgraded this application and try to run it I get the following error. I talk to your sales team and they said it is compatible with any Visual Studio's using odbc connection. I basically created a label using a CSV comma delimited text file as the database and .net framework 4 not 4.5. This all works great in the VS2010. Am I missing something or is this just not compatible with VS2012 yet? If so when will it be compatible with VS2012?


System.InvalidOperationException was unhandled
HResult=-2146233079
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'Seagull.BarTender.Print, Version=10.0.0.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=Label Generator
StackTrace:
at Label_Generator.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at Label_Generator.My.MyProject.MyForms.get_frmMain()
at Label_Generator.My.MyApplication.OnCreateMainForm() in I:\Work Stuff\Current Apps\Desktop\VS2012\Label Generator\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at Label_Generator.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.BadImageFormatException
HResult=-2147024885
Message=Could not load file or assembly 'Seagull.BarTender.Print, Version=10.0.0.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=Label Generator
FileName=Seagull.BarTender.Print, Version=10.0.0.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7
FusionLog==== Pre-bind state information ===
LOG: User = VISKASE\ggoehring
LOG: DisplayName = Seagull.BarTender.Print, Version=10.0.0.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7
(Fully-specified)
LOG: Appbase = file:///I:/Work Stuff/Current Apps/Desktop/VS2012/Label Generator/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : Label Generator, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Seagull.BarTender.Print, Version=10.0.0.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7
LOG: Attempting download of new URL file:///I:/Work Stuff/Current Apps/Desktop/VS2012/Label Generator/bin/Debug/Seagull.BarTender.Print.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

StackTrace:
at Label_Generator.frmMain..ctor()
InnerException:

3 意見

0
Avatar
Legacy Poster
評論操作 永久連結

Tried adding this to my app.config file:

[code]
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
[/code]

Get these 4 Messages
Message 1
Could not find schema information for the attribute 'useLegacyV2RuntimeActivationPolicy'.

Message 2
Could not find schema information for the element 'supportedRuntime'.

Message 3
Could not find schema information for the attribute 'version'.

Message 4
Could not find schema information for the attribute 'sku'.

Also getting this warning:

Warning
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Seagull.BarTender.Print, Version=10.0.0.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

My Target CPU is set to AnyCPU.
0
Avatar
Raul Soto
評論操作 永久連結

Set the Target CPU to 32 bit.

Raul Soto
Technical Support Representative
425-641-1408
0
Avatar
Legacy Poster
評論操作 永久連結

I set it to x86 and that seemed to fix it. Schema dotNetConfig20.xsd, dotNetConfig30.xsd, dotNetConfig35.xsd, dotNetConfig40.xsd do not have the below in the XML. However DotNetConfig.xsd did but was not checked in XML Schemas set to automatic.

[code]
<xs:element name="startup" vs:help="configuration/startup">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="supportedRuntime" vs:help="configuration/startup/supportedRuntime">
<xs:complexType>
<xs:attribute name="version" type="xs:string" use="optional" />
<xs:attribute name="sku" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="requiredRuntime" vs:help="configuration/startup/requiredRuntime">
<xs:complexType>
<xs:attribute name="version" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="useLegacyV2RuntimeActivationPolicy" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
[/code]

So not sure if you will need this since change to x86 below was not needed.

[code]
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
[/code]




[quote name='Raul S - Seagull Support' timestamp='1346083295' post='3151']
Set the Target CPU to 32 bit.

Raul Soto
Technical Support Representative
425-641-1408
[/quote]

登入寫評論。