Why is OneDrive Deleting My Project Files Causing Error System.InvalidOperationException? - vb.net

It seems as though OneDrive somehow kept deleting my files from my project (that I REALLY NEED!) & now my project keeps throwing errors saying that This all happens when I go to run the program in DEBUG. I have missing files as shown in the image below:
System.InvalidOperationException
HResult=0x80131509
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'MySql.Data, Version=8.0.30.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source=eBayKeywordSniperPro
StackTrace:
at eBayKeywordSniperPro.My.MyProject.MyForms.Create__Instance__[T](T Instance)
at eBayKeywordSniperPro.My.MyProject.MyForms.get_FormSelector()
at eBayKeywordSniperPro.My.MyApplication.OnCreateMainForm()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at eBayKeywordSniperPro.My.MyApplication.Main(String[] Args)
Inner Exception 1:
FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=8.0.30.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
I have disconnected OneDrive because I feel like they are stealing my data/files and then charging me for additional storage. If I didn't pay Microsoft, then they won't allow me to retrieve the data. That's shady.
Anyhow, I don't see any options to use the "Nuget Installation" to download the dependencies or necessary files that the project needs to run.
How do I make sure that the files remain in the proper folders after disconnecting from Microsoft's OneDrive? Thanks.

Related

Could not load file or assembly

I am using aws lamda function to connect my database and execute sql script file but whenever I run my project I am getting same error
I am getting this error in Lamda Mock Test Tool
Can anyone help me out..?Please let me know
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo, Version=16.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. The system cannot find the file specified.
at AwsLamdaDb.Function.FunctionHandler(String input, ILambdaContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at AwsLamdaDb.Function.FunctionHandler(String input, ILambdaContext context)
---------------- Inner 1 Exception ------------
System.IO.FileNotFoundException: Could not load the specified file.
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
I am not .NET resource, though I think this is due to improper installation of SQL Server SDK Assemblies. Can you check if the SQL Server SDK is installed or not?
Refer: https://social.msdn.microsoft.com/Forums/ie/en-US/896e04a7-d5b0-41bf-a846-eb69dc5cc06a/microsoftsqlserverconnectioninfo-load-error?forum=adodotnetdataproviders

SolrNET Ninject Integration Error- Could not load file or assembly 'HttpWebAdapters'

I had successfully implemented Solrnet using Ninject Integration. However it suddenly started failing yesterday giving the following error.
Could not load file or assembly 'HttpWebAdapters, Version=0.4.0.2002, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Here is the stack trace:
[FileNotFoundException: Could not load file or assembly 'HttpWebAdapters, Version=0.4.0.2002, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
SolrNet.Impl.SolrConnection..ctor(String serverURL) +0
Ninject.Integration.SolrNet.SolrNetModule.Load() in c:\Users\kanja-1\Documents\Visual Studio 2012\Projects\Ninject.Integration.SolrNet\Ninject.Integration.SolrNet\SolrNetModule.cs:205
Ninject.Modules.NinjectModule.OnLoad(IKernel kernel) in c:\Projects\Ninject\ninject\src\Ninject\Modules\NinjectModule.cs:85
Ninject.KernelBase.Load(IEnumerable1 m) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:217
Ninject.KernelBase..ctor(IComponentContainer components, INinjectSettings settings, INinjectModule[] modules) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:100
Ninject.KernelBase..ctor(INinjectModule[] modules) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:57
Ninject.StandardKernel..ctor(INinjectModule[] modules) in c:\Projects\Ninject\ninject\src\Ninject\StandardKernel.cs:46
MealsToGo.App_Start.NinjectWebCommon.CreateKernel() in c:\Users\kanja-1\Documents\Visual Studio 2012\Projects\MealsToGo\MealsToGo\App_Start\NinjectWebCommon.cs:53
Ninject.Web.Common.Bootstrapper.Initialize(Func1 createKernelCallback) in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\Bootstrapper.cs:50
MealsToGo.App_Start.NinjectWebCommon.Start() in c:\Users\kanja-1\Documents\Visual Studio 2012\Projects\MealsToGo\MealsToGo\App_Start\NinjectWebCommon.cs:34
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
Does someone know what I need to do to fix this?
thanks

Publish ClickOnce installation error "Exception reading from manifest" using VB.NET

I'm using Visual Studio 2010 and VB.NET. My target environment is .NET Framework 4.0.
So I'm facing this problem when I'm publishing my project by using the provided Setup.exe file. After the verifying application requirement popped up, an alert popped up with text:
Cannot Continue. The application is improperly formatted. Contact the application vendor for assistance.
When I clicked on the "Detail" button, it showed me this error:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.239
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.239 (RTMGDR.030319-2300)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment URL : file:///I:/ProjectBMTRelease/ProjectBMT.application
IDENTITIES
Deployment Identity : ProjectBMT.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=7439f62500c0364d, processorArchitecture=x86
APPLICATION SUMMARY
* Installable application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of I:\ProjectBMTRelease\ProjectBMT.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
+ Exception from HRESULT: 0x80070C81
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [6/23/2012 5:21:36 PM] : Activation of I:\ProjectBMTRelease\ProjectBMT.application has started.
* [6/23/2012 5:21:36 PM] : Processing of deployment manifest has successfully completed.
* [6/23/2012 5:21:36 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2012 5:21:36 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: 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.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
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 (ManifestParse)
- Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Runtime.InteropServices.COMException
- Exception from HRESULT: 0x80070C81
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
I checked my project's manifest file, but I am not good enough to find any problem there. For other information, I created simple "Hello World !" application to see if it will get published well, and it did.
What is the solution?
Check the following:
Does the user have .NET 4 installed on their computer?
How are you publishing the application, are you using Visual Studio?
Are you making any changes to the deployment after publishing it?
If you are manually moving the files to the deployment location, is the structure identical to the original structure?
Try enabling detailed logging and see if that provides more information. The
article Enhanced Logging in ClickOnce Deployment shows you how to do that.
I got this very same error. The problem got resolved after I renamed my assembly name found on the first tab under application properties. It seems like having an assembly name with a space creates a manifest filename with a blank space and it seems to create problems. My application assembly name was named "Capital Manager". After I changed it to "Capital_Manager" (I replaced the space with an under score "_") the issue got resolved.
I received an error report and call stack pretty much identical to yours when attempting to run the ClickOnce installer. My findings so far may be helpful to others arriving here, so I'll post the details, but I have a feeling this same error report may be caused by a range of different problems.
The first thing I noticed was that my application manifest (the one that lists all of the files for the application + a signature hash for each) had entries for assemblies that had an invalid publicKeyToken, for example,
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="foo.exe" version="1.2.3.4" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
Further down the file instead of seeing dependentAssembly elements for assemblies some of the assemblies were listed as plain content files (file elements).
These problems certainly make the ClickOnce deployment invalid, and the cause was using a version of Mage that was compiled against an older version of .NET than the assemblies it was trying to create manifests for. When creating the application manifest Mage will attempt to read assemblies as follows:
AssemblyIdentity.FromFile(fileName);
And for Mage compiled against .NET 3.5 (CLR 2.0) trying to load a .NET 4.0 assembly results in a BadImageFormatException exception which is handled, and the fall-back behaviour is to treat these files as content files.
Does your application folder have subfolders? I got this same HRESULT just yesterday, and the root cause was that a library (EntityFramework.dll) was in both the top level and in a subfolder. (There was a MAGE warning about this, but it was not handled as an error.) I updated my script to remove EntityFramework.dll from the subfolder, and the ClickOnce is fine now.
Just another possibility - I got a similar error when adding a dpiAware to a newly created app.manifest file. ClickOnce started failing immediately.
I followed the advise here: Installing ClickOnce published DPI-aware application
So if you've been doing dpi things, maybe look there.

ILMerge and MSBuild - merged EXE is giving runtime error

After adding ILMerge to my post build tasks and working out the commandline, I sucessfully get a merged program MyMerged.exe
But when I run it, I get an exception
Unhandled Exception: System.TypeLoadException:
Could not load type 'Microsoft.Build.Utilities.TaskItem' from assembly 'mymerged, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because the method '.ctor' has no implementation (no RVA).
at MyProgram.Program.Main(String[] args)
Is this a bug in ILMerge not handling a situation where there is no constructor, or a bug in TaskItem for not having one.
thanks
Include Microsoft.Build.Utilities.dll on the ILMerge command line so that it will get merged in with your assembly and found.
If you have duplicate types defined and use the /allowDup command line switch, ILMerge will rename the duplicate types and this may also cause "Could not load type ..." errors and unexpected behavior during runtime, especially when reflection is being used.

PRISM exception on not existing method

I am using PRISM for Silverlight 4.0 in one of my projects where I also access Sharepoint 2010.
The strange thing is that randomly I get the error:
An exception occurred while initializing module 'SharepointServiceModule'.
- The exception message was: Die Methode add_GetListCompleted im Typ SharepointServiceModule.Services.SharepointObjectModelService der Assembly SharepointServiceModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null hat keine Implementierung.
- The Assembly that the module was trying to be loaded from was:SharepointServiceModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
Which is very strange for me because first of all it happens only randomly and second that the method "add_GetListCompleted" is an event which must be implemented because I use it and it works.
Does anybody have an idea of whats going on here?
I found a solution for my problem.
First I tried to change the name of the interface and I noticed that the interface name did not change in the error message.
Therefore I removed the affected xap module from the Web project (this can be done in the properties of the "name.Web" project under "Silverlight Applications") and added it again. Then I performed a clean of the solution and a rebuild. After that everthing worked fine...