I am having some issues making a setup project in visual studio 2010. I am using Addin-express to make a program associated with Microsoft Excel and I am using in it SQLite for a simple database. I have read other answers on stackoverflow but their solutions have not aided me.
I am using SQLite.net which can be found at http://sqlite.phxsoftware.com. I have not been able to connect to that website so the direct link to the dll is http://sourceforge.net/projects/sqlite-dotnet2/
This addin is using the 32 bit version of Microsoft Office Excel, though I am running 64 bit windows 7, and so I have included the 32 bit version of the dll in the Visual Studio 2010 project. I have had no problems running the 32 bit dll in Visual Studio debugging and so I have included that same dll in my Visual Studio install project. However, when I run this install program on my virtual machine (also Windows 7 64 bit) I receive the following error and stack trace:
Detailed technical information follows:
---
(Inner Exception)
(Inner Exception)
Date and Time: 4/5/2012 7:24:52 PM
Machine Name: TOM-PC
IP Address: --------------------
Current User: Tom-PC\Tom
Application Domain: C:\Program Files (x86)\Fintools\Fintools XL\
Assembly Codebase: file:///C:/Program Files (x86)/Fintools/Fintools XL/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=6.5.3057.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.5.3057.2005
Exception Source:
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Failed to load the runtime. (Exception from HRESULT: 0x80131700)
Exception Target Site: Object reference not set to an instance of an object.
---- Stack Trace ----
(Outer Exception)
Date and Time: 4/5/2012 7:24:52 PM
Machine Name: TOM-PC
IP Address: -------------------
Current User: Tom-PC\Tom
Application Domain: C:\Program Files (x86)\Fintools\Fintools XL\
Assembly Codebase: file:///C:/Program Files (x86)/Fintools/Fintools XL/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=6.5.3057.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.5.3057.2005
Exception Source: COMWizards
Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. Failed to load the runtime. (Exception from HRESULT: 0x80131700)
Exception Target Site: GetDataTable
---- Stack Trace ----
COMWizards.SQLiteDatabase.GetDataTable(sql As String)
AddinExpress.MSO.2005.DLL: N 00000 (0x0) JIT
COMWizards.frmImpliedForwardRate.GetMostRecentDate(strDataTableName As String)
AddinExpress.MSO.2005.DLL: N 0020 (0x14) IL
COMWizards.frmImpliedForwardRate..ctor(appExcel As _Application, Path As String)
AddinExpress.MSO.2005.DLL: N 0110 (0x6E) IL
COMUI.AddinModule.adxIFRWiz_OnClick(sender As Object, control As IRibbonControl, pressed As Boolean)
AddinExpress.MSO.2005.DLL: N 0007 (0x7) IL
AddinExpress.MSO.ADXRibbonButton.DoInternalAction(e As ADXRibbonOnActionEventArgs)
AddinExpress.MSO.2005.DLL: N 0035 (0x23) IL
(Outer Exception)
Date and Time: 4/5/2012 7:24:52 PM
Machine Name: TOM-PC
IP Address: ----------------------
Current User: Tom-PC\Tom
Application Domain: C:\Program Files (x86)\Fintools\Fintools XL\
Assembly Codebase: file:///C:/Program Files (x86)/Fintools/Fintools XL/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=6.5.3057.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.5.3057.2005
Exception Source:
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: An error has occured in the code of the add-in.
Exception Target Site: Object reference not set to an instance of an object.
---- Stack Trace ----
I have tried building this project both with the "Any CPU" and "x86" platforms and neither has worked. I have tried using the 64 bit version of the DLL and it has given me the badimageformat exception which leads me to believe that the 32 bit version is the correct version to use. I have placed the system.data.sqlite.dll both in the root folder for my addin and in the root folder for excel and neither has resolved my issue. I am completely out of ideas, though I am an inexperienced .NET programmer so I am looking for advice here on how to resolve this issue.
Thank you for your input.
Please use this far more up-to-date system.data.sqlite.dll that supports the latest versions of sqlite and .Net:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
Related
My .net project (Any CPU) is referring to Oracle.dataaccess x86 version . In my local GAC the odac version is x86. But in the web server where it was installed previously was having AMB64 version of odac in GAC . The site was working without any problem . Now I need to move the site to AWS .The windows instance in AWS has the below configuration.
OS version : Microsoft windows server 2012 R2 Standard .
IIS 8.5
The server is clean and does not have any software installed .
When I try to create a site , I ended up seeing **could not load file or assembly one of its dependencies **. Through forums I installed various libraries from Oracle but I don't understand what are the exact steps needed . I was just doing trial and error.
Please let me know the software or steps to follow which needs do be installed such that my .net site which is connecting to its Oracle database works .
Edit 1 :
Hi ,
I performed the following steps .
As suggested by you I added Oracle.managedDataaccess dll(x86) . It worked well in my local.
Deployed the same code in the server.
I installed the oracle_12.1.0.1.0
In C:/oracle_12.1.0.1.0/odp.net/managed/x86 I ran the bat file for configuring the managed odac in the server. I was able to see the changes in the machine.config file .
5.Now when I ran the site I got the below error .
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
System.TypeInitializationException: The type initializer for
'Oracle.DataAccess.Client.OracleClientFactory' threw an exception.
---> System.DllNotFoundException: Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT:
0x8007007E) at
Oracle.DataAccess.Client.OpsInit.CheckVersionCompatibility(String
version) at Oracle.DataAccess.Client.OracleInit.Initialize() at
Oracle.DataAccess.Client.OracleClientFactory..cctor() --- End of
inner exception stack trace --- --- End of inner exception stack
trace --- at System.RuntimeFieldHandle.GetValue(RtFieldInfo field,
Object instance, RuntimeType fieldType, RuntimeType declaringType,
Boolean& domainInitialized) at
System.Reflection.RtFieldInfo.UnsafeGetValue(Object obj) at
System.Reflection.RtFieldInfo.GetValue(Object obj) at
System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at
System.Data.Entity.Internal.LazyInternalConnection.CreateConnectionFromProviderName(String
providerInvariantName) at
System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings
appConfigConnection) at
System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String
name, AppConfig config) at
System.Data.Entity.Internal.LazyInternalConnection.Initialize() at
System.Data.Entity.Internal.LazyInternalConnection.get_Connection()
at Sample.Data.AbstractEFUnitOfWork2.SetClientId(String clientId)
at Sample.Web.Controllers.ApiControllerBase1..ctor(IUow uow,
IConnectionManager cm, IEnumerable`1 allowedAppUserbases, String
connectionName, Boolean allowSaves)
In order to fix this I added OraOps12 dll from c:/oracle_12.1.0.1.0/bin to the wwwroot/site/bin folder. Then I got the below error .
System.ArgumentException: Unable to find the requested .Net Framework
Data Provider. It may not be installed. at
System.Data.Common.DbProviderFactories.GetFactory(String
providerInvariantName) at
System.Data.Entity.Internal.LazyInternalConnection.CreateConnectionFromProviderName(String
providerInvariantName) at
System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings
appConfigConnection) at
System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String
name, AppConfig config) at
System.Data.Entity.Internal.LazyInternalConnection.Initialize() at
System.Data.Entity.Internal.LazyInternalConnection.get_Connection()
at Sample.Data.AbstractEFUnitOfWork2.SetClientId(String clientId)
at Sample.Web.Controllers.ApiControllerBase1..ctor(IUow uow,
IConnectionManager cm, IEnumerable`1 allowedAppUserbases, String
connectionName, Boolean allowSaves)
Checking to resolve this .
Appreciate your suggestions.
Apologies for my lack of knowledge as I do not have much experience.
I have created a VB.NET application using visual basic 2015 however, when I tried to run the application on XP Professional Version 2002 SP3 I get the follow error message.
I have for the life of me do not know how to fix this. The .net framework which the application was created in was 4.5.2.
The application works perfectly on Windows 7 and Windows 10.
However, issues are only on XP
PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 4.0.30319.269
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.269 (RTMGDR.030319-2600)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file:///C:/Documents%20and%20Settings/rwuser/Desktop/Disk%20Cleanup%20Toolkit/drive_cleanup.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Documents and Settings\rwuser\Desktop\Disk Cleanup Toolkit\drive_cleanup.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/Documents%20and%20Settings/rwuser/Desktop/Disk%20Cleanup%20Toolkit/drive_cleanup.application: the manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ SignatureDescription could not be created for the signature algorithm supplied.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [28/07/2016 09:56:20] : Activation of C:\Documents and Settings\rwuser\Desktop\Disk Cleanup Toolkit\drive_cleanup.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [28/07/2016 09:56:21] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/Documents%20and%20Settings/rwuser/Desktop/Disk%20Cleanup%20Toolkit/drive_cleanup.application: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
- Manifest XML signature is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
- SignatureDescription could not be created for the signature algorithm supplied.
- Source: System.Security
- Stack trace:
at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignature(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
XP only supports the .NET Framework up to version 4.0. If you want to run it on XP you'll need to change the target framework to 4 and re-compile the project.
https://blogs.msdn.microsoft.com/dotnet/p/dotnet45xp/
I am getting the following error when I compile the release of my web application. The project ran fine previously on another machine the hard drive went out on. So I am thinking there is a problem with the configuration. I did some research and it made note of a Web Deploy issue but I am unable to verify what version was in use on the past machine.
Here is the error:
The "IsCleanMSDeployPackageNeeded" task failed unexpectedly.
System.InvalidCastException:
[A]Microsoft.Web.Deployment.DeploymentProviderOptions cannot be cast
to [B]Microsoft.Web.Deployment.DeploymentProviderOptions. Type A
originates from 'Microsoft.Web.Deployment, Version=9.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context
'Default' at location
'C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Deployment\9.0.0.0__31bf3856ad364e35\Microsoft.Web.Deployment.dll'.
Type B originates from 'Microsoft.Web.Deployment, Version=7.1.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context
'Default' at location
'C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Deployment\7.1.0.0__31bf3856ad364e35\Microsoft.Web.Deployment.dll'.
at Microsoft.Web.Deployment.ArchiveElementHelper.get_ProviderContext()
at
Microsoft.Web.Deployment.ZipPackageProvider.d__0.MoveNext()
at
Microsoft.Web.Deployment.DeploymentObject.d__9.MoveNext()
at
Microsoft.Web.Deployment.DeploymentObject.d__0.MoveNext()
at
Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded.CheckMSDeployDumpContainIisSetting(DeploymentObject
deploymentObject, String& iisMSDeployProviderName) at
Microsoft.Web.Publishing.Tasks.IsCleanMSDeployPackageNeeded.Execute()
at
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at
Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() 0 0 PKL_QMW
Apparently this can happen if you install the Web Deployment package without the UI Components.
Try going into add remove programs and doing a Change install on 'Microsoft Web Deploy' and ensure that the UI components are selected to install.
We applied Transient Fault Handling Block for our web role of cloud service, we even didn't write one single line code. When we try to debug our cloud service locally, the exception would show on webpage, like this:
The path is too long after being fully qualified. Make sure the full
path is less than 260 characters and the directory name is less than
248 characters.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: The path is too long
after being fully qualified. Make sure the full path is less than 260
characters and the directory name is less than 248 characters.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/AzureCloudService2/WebRole1/
LOG: Initial PrivatePath = C:\AzureCloudService2\WebRole1\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\AzureCloudService2\WebRole1\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/<user>/AppData/Local/dftmp/Resources/7f758b78-aef1-47f7-ad86-8be56d4218e0/temp/temp/RoleTemp/Temporary ASP.NET Files/root/63defe93/23a6bb89/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Attempting download of new URL file:///C:/Users/<user>/AppData/Local/dftmp/Resources/7f758b78-aef1-47f7-ad86-8be56d4218e0/temp/temp/RoleTemp/Temporary ASP.NET Files/root/63defe93/23a6bb89/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Attempting download of new URL file:///C:/AzureCloudService2/WebRole1/bin/Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.DLL.
LOG: Using application configuration file: C:\AzureCloudService2\WebRole1\web.config
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
ERR: Failed to complete setup of assembly (hr = 0x8007006f). Probing terminated.
From the logging, it seems couldn't find Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ServiceBus.dll in above locations, but actually it indeed located at C:/AzureCloudService2/WebRole1/bin/, I've checked it many times.
Several information:
We just install the packages via Nuget
We also tried other packages such as TransientFaultHandling.Caching .etc, all have such problems.
What's interesting is it works fine in worker role
#RandyLevy thanks for your comment, it solved my problem. You would win the bounty if you post it as an answer :)
It looks like the ASP.NET temporary directory is exceeding the max
path length. Take a look at Windows Azure - Resolving 'The Path is
too long after being fully qualified Error Message' to set the
_CSRUN_STATE_DIRECTORY environment variable. – Randy Levy
I have a Coded UI + SpecFlow test project (.NET Framework 4).
I want to perform remote test execution, so I configured a Visual Test Agent - Controller environment setup. My local machine is the Controller and there is a virtual machine which is the agent. The AUT will run on a Windows Embedded System with Windows XP SP3. The AUT is a WPF application.
VM properties:
Windows XP SP 3
Microsoft Test Agent 2012 is installed on the VM (Agents for Visual Studio 2012 Update 3)
The agent-controller communication is established successfully (Agent - Online, OK; Controller - Running, OK; TestSettings.testsettings - Configured, OK). The test execution is performed using mstest.
The following error is displayed when I execute the tests:
Test Name: CodedUITestMethod1
Test FullName: Remote.Test.CodedUITest1.CodedUITestMethod1
Test Source: c:\Users\user\Documents\Visual Studio 2012\Projects\Remote.Test\Remote.Test\CodedUITest1.cs : line 27
Test Outcome: Failed
Test Duration: 0:00:01.7131241
Result Message: Error calling Initialization method for test class Remote.Test.CodedUITest1: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
Result StackTrace:
--- End of inner exception stack trace ---
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssembly(String assemblyFile)
By definition Coded UI does not support Windows XP.
Is there a workaround for the upper mentioned issue? Any suggestions?
Thank you,
Isolation of Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.dll from c:\Program Files\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages\ solved the problem. Action was performed on the remote VM.
The tests are up and running.