This is a Windows 7 machine with Service Pack 1, and I published a C# WPF application using x86 target platform configuration since it also needs to be installed on XP machines.
The problem I'm dealing with is becoming a nuisance. The application runs fine in Visual Studio 2008 debug mode. After running the setup executable generated from publishing, the installation completes successfully (or at least appears that way), but when it attempts to open, I get the Application cannot be started. Contact the application vendor. message box.
Here is the Error Summary section of the log file:
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://ServerPath/MyApplication_Install/Release/x86/MyApplication.application resulted in exception. Following failure messages were detected:
+ Value does not fall within the expected range.
And the Error Details section:
ERROR DETAILS
Following errors were detected during this operation.
* [9/12/2012 8:15:42 AM] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
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)
There are other ClickOnce questions on here that deal with Microsoft.Vbe.Interop, Version=14.0.0.0 - that does appear in this log file under the OPERATION PROGRESS STATUS section, but it doesn't say the assembly needs to be installed in the Global Assembly Cache.
* [9/12/2012 8:45:19 AM] : Detecting dependent assembly Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C, processorArchitecture=msil using Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=msil.
* [9/12/2012 8:45:19 AM] : Detecting dependent assembly Microsoft.Vbe.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C using Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.
Do I need to remove leftover files/folders from previous installations? That's my gut feeling, but I don't know where to look inside the AppData/Local/Temp or Windows/System32 folders.
Edit
I did some deep digging and found the executable for my application here:
C:\Users\MyUsername\AppData\Local\Apps\2.0\A30V87AA.25Q\PQ06CCDW.CYM\wpfb..tion_41f7e986af356c0c_0004.0004_b15da840f06645a3\MyApplication.exe
It loaded up without any errors. And to confirm this was from the installation, not my source code, I did an uninstall in Control Panel, checked that directory and all the files were gone.
After re-installing from setup.exe, a different set of jibberish folder directories were made, but I was still able to run the application.
So why does the Application cannot be started. Contact the application vendor. message pop up after installation, even though there is a working copy deep inside the AppData directory?
Edit #2
As suggested by jvanh1, I ran as an administrator to see if that made any difference. Unfortunately it didn't.
I was forced to checkout the latest tagged version and do some manual copy/pasting - the subsequent publish actually worked. The more important issue here is that we never have used branching before in our version control (at least not for this application), so I convinced my manager to let me give it a shot.
I will continue to investigate what caused this annoying ClickOnce publish problem in the first place - my guess is different sets of references in the tagged version vs. my working copy.
I encountered a very similar issue, it turns out one of the reference dll was moved but the hintpath wasn't updated. VS didn't warn me, instead it automatically referenced the GAC copy, causing a prerequisite change. I fixed the issue by replacing the GAC reference with local dll reference.
Related
I hope you're fine! So far I never needed to hand in an own question, because I usually found the solution to my problem here at stack overflow. However, this time I'm lost and I hope someone can help me:
I'm just trying to in myself some SSIS-basics. I already programmed a package to download data from a Web-API and to put it into my database. For the JSON response from the API I use the "Newtonsoft.Json.dll" reference. The package itself works fine when executed in Visual Studio, however when I deploy it to the SQL Server and try to execute it from there it fails. I get the following message:
Insert and Update:Error: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=a3ce77dd63f8269a' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=a3ce77dd63f8269a' ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
So, I understand that the Newtonsoft.Json.dll cannot be found.
I searched the internet and found that several people had similar problems. I could also find threads here on this site. I understood that I need to do two things:
Strong name the Newtonsoft.Json.dll
Add it to the GAC
To strong name it, I used the process described here:
http://codeingaddiction.blogspot.com/2011/06/how-to-add-strong-name-to-existing-dll_16.html
I also checked whether this worked OK using this:
https://blog.codingoutloud.com/2010/03/13/three-ways-to-tell-whether-an-assembly-dl-is-strong-named/
I then installed it to the GAC in the command prompt like this:
gacutil -i (Path)Newtonsoft.Json.dll
Unfortunately I still receive the same error message when I try to execute it through SSMS.
Does anyone have another idea? I really appreciate your support!
Christian
Try to add this to your project file:
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
it will be like this:
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
....
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
<AspNetCoreModuleModel>AspNetCoreModule</AspNetCoreModuleModel>
<PreserveCompilationContext>true</PreserveCompilationContext>
....
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
....
</PropertyGroup>
I guess you are using a .NET Core version that your server doesn't install. with this option, your deployed server will have a folder called refs, which contains all platform related libraries, and works independently with installed version.
If it still happen, the error comes from your code but not environment.
OS: Windows 7 64 bit using Visual Studio Pro 2012 with .NET 4.5 installed.
I used the Publish option within Visual Studios and ensured that I had clicked the Sign the clickOnce manifest and Sign the Assembly. It will still not run on another computer and says I do not have a valid XML signature. I have pasted the error message below.
I have also read: How to move a ClickOnce deployment package, Do I have to sign my ClickOnce manifest?. VS2012 .NET 4.0 Clickonce VSTO CryptographicException: SignatureDescription could not be created for the signature algorithm supplied and several others.
I need to be able to deploy my program on .NET 4.0 at the minimum and I do not have access to another version of Visual Studios. Thanks in Advance!
complete Error Below:
PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 2.0.50727.3603
System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000)
mscorwks.dll : 2.0.50727.3603 (GDR.050727-3600)
dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file:///C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.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\Administrator\Desktop\EatonWizard.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.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
* [10/10/2012 2:05:02 PM] : Activation of C:\Documents and Settings\Administrator\Desktop\EatonWizard.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [10/10/2012 2:05:02 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.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.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.
I had the same problem today. This is how I solved:
What caused the problem:
We created a clickonce project using vs2012 and framework 4.5.
Then we changed the target framework to 4.0 (client asked to).
The problem is: Framework 4.5 uses SHA-256 algorithm for the signature, and 4.0 uses SHA-1. When we changed the target framework to 4.0 and vs2012 didn't changed the algorithm.
Solution: Change the algorithm manually, generating a new certificate.
Go to Project properties -> signing
You will see the algorithm that is being used in 'Signature Algorithm'. You can create a new test certificate and then you will notice that it changes to 'sha1RSA'
Note, I would have added this as a comment, but due to silly Reputation rules, I can only add an answer!
Beware new code signing certificates
I had this problem recently because our Code Signing certificate needed renewal. So, being blind to the fact that Microsoft haven't patch the XP version of Framework 4 to work with SHA2 certificates during ClickOnce deployment, I told all my clickonce projects to use the new code signing certificate.
As I also do code-based updates of the app rather than just let Microsoft handle it, so that it's a more seamless experience to the end user without them required to press buttons and in the style of my app.
However, I hit a bug where my program didn't report the manifest error, instead it just hung (my bad!). In order to get an update our after working until 3am to discover this problem, I had to create a temporary certificate issued by Visual Studio. The problem with that? Code updates are not seamless any more because microsoft put a stupid dialog up as the publisher is unknown!
So my biggest concern is that yes, OK, XP is not supposedly supported from Monday but that shouldn't mean the Framework 4 shouldn't accept the new certificates if that's what they are pushing to everyone. Microsoft are even actively involved in that push!
The only working answer is as above, you MUST use Visual Studio to create an untrusted temporary certicate, which is rediculous!!! (I still have hope that maybe I didn't find the correct way to use the new certicate)
I've had a ClickOnce app in use for a few months now, but recently started getting an error on my deployment of the latest version. With this latest version I've added a reference to a DLL that I hadn't used before (FTD2XX_NET.dll if it's relevant), and suspect that this is related to the issue but I cannot figure out how to fix it.
The actual project being deployed references another library project, which is what references the DLL (it references other DLL's but that has worked for months and they haven't changed). Following these threads I've tried deleting my "Local Settings/Apps" folder and rebooting multiple times, as well as recreating the project and deploying to a different location. The error exists on multiple machines so I do not suspect it's user profile corruption. Here is the full error I'm given:
PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 4.0.30319.261
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.261 (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://nt_server/prog/Publish/Digipot%20Utility/Digipot%20Utility.application
Deployment Provider url : file://nt_server/Prog/Publish/Digipot%20Utility/Digipot%20Utility.application
Application url : file://nt_server/prog/Publish/Digipot%20Utility/Application%20Files/Digipot%20Utility_1_0_0_72/Digipot%20Utility.exe.manifest
IDENTITIES
Deployment Identity : Digipot Utility.application, Version=1.0.0.72, Culture=neutral, PublicKeyToken=1e3769a7c667fbc1, processorArchitecture=msil
Application Identity : Digipot Utility.exe, Version=1.0.0.72, Culture=neutral, PublicKeyToken=1e3769a7c667fbc1, processorArchitecture=msil, type=win32
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 \\nt_server\prog\Publish\Digipot Utility\Digipot Utility.application resulted in exception. Following failure messages were detected:
+ Value does not fall within the expected range.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [3/14/2012 10:17:15 AM] : Activation of \\nt_server\prog\Publish\Digipot Utility\Digipot Utility.application has started.
* [3/14/2012 10:17:15 AM] : Processing of deployment manifest has successfully completed.
* [3/14/2012 10:17:15 AM] : Installation of the application has started.
* [3/14/2012 10:17:15 AM] : Processing of application manifest has successfully completed.
* [3/14/2012 10:17:17 AM] : Found compatible runtime version 2.0.50727.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil using Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly NationalInstruments.Common.Native, Version=8.6.35.131, Culture=neutral, PublicKeyToken=18CBAE0F9955702A, processorArchitecture=x86 using NationalInstruments.Common.Native, Version=8.9.35.302, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=x86.
* [3/14/2012 10:17:17 AM] : Detecting dependent assembly NationalInstruments.Common, Version=8.6.35.131, Culture=neutral, PublicKeyToken=18CBAE0F9955702A, processorArchitecture=msil using NationalInstruments.Common, Version=8.9.35.302, Culture=neutral, PublicKeyToken=18cbae0f9955702a, processorArchitecture=msil.
* [3/14/2012 10:17:17 AM] : Request of trust and detection of platform is complete.
ERROR DETAILS
Following errors were detected during this operation.
* [3/14/2012 10:17:18 AM] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)
at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
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)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Thanks in advance,
Joseph
Edit: It seems the problem is spreading. On the second machine I purged all of the ClickOnce files in the "Local Settings/Apps" so I had to reinstall an old program. When I went to do so it gave me the same error. This program was last updated in February. In response I tried totally removing and reinstalling the .NET framework to no avail.
My cure was a bit different. I was only having problems on one of 3 machines at my workplace. After trying most, if not all, of the solutions above I tried this:
Cleared out my AppData folder but it was hard to find. Mine was located here:
C:\Users\%usernamefolder%\AppData\Local\Apps\2.0\PN1V0WLG.QB8\2RVAAAH2.PA9
this portion "PN1V0WLG.QB8\2RVAAAH2.PA9" might be unique to my machine. But in the 2RVAAAH2.PA9 there were some folders whose name started with the first 4 letters of my application name:
Eg. "prog...exe_f9d3a3c4fe2dee3c_0001.0000_none_81c53bb624457ad3"
I went ahead and actually deleted all folders in the 2RVAAAH2.PA9 directory as they all seemed to pertain to my program or references in my program. I could tell some of them were related to Telerik DLLs that I use so I dumped them too.
I then re-installed my program and it worked.
Looks like it could be several issues take a look and see if any of them help
Check and see if there is a & in the path of the application
http://connect.microsoft.com/VisualStudio/feedback/details/361607/clickonce-application-does-not-install-when-the-deployment-path-includes-ampersand
also take a look at this
We used to target "any cpu", and had to change it to x86 in order to get it to work on 64-bit machines. For us, this is because we use DirectX, and it only supports 32-bit machines. So even though we put all of the DirectX code in its own project that targeted x86, we had to have our startup project also target x86.
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9e4b714e-bad4-4c62-a7ad-3c80e32d95eb/
It appears to be caused by an unknown change in the .vbproj file. If you have source control, or backups of your files, restoring an old version of the .vbproj file and republishing seems to fix the problem. You may or may not have to uninstall on the target machine if they tried to run the bad publish.
http://connect.microsoft.com/VisualStudio/feedback/details/437590/value-does-not-fall-within-the-expected-range-click-once-deployment-failure
Make sure you don't have any mismatched version numbers on any dlls , or any circular references.
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/9e4b714e-bad4-4c62-a7ad-3c80e32d95eb/
So I found a solution, at the advice of the non-"Answer" solutions on this thread I turned off automatic version incrementing and manually updated the Assembly and File version in the Project settings under "Application > Assembly Information..." and it worked.
Remove any & from the Folder name if there is any & in the folder name. I was also having same problem for this reason.
Reference:Check Here
The workaround is just to uninstall and reinstall the application. I have yet to find a solution to the error itself, and why it happens so randomly. I will release a new version, and it will happen to one other person, and nobody else. I just released a new version a few minutes ago, and it screwed up my version on my machine, and nobody else's. I have yet to figure out a solution, since when I publish it works on most machines, but not on a couple. Has been this way for literally 12 years.
If you are trying to run the clickonce on a UNC share, it may not work. I was getting the same result as yours above, but I just tried deploying to C:\ instead of our share, and it runs just fine. I know this isn't a solution, but at least it's a clue - not sure if this has to do with Authentication... or something deeper. Man, I wish the error message was more helpful.
Platform target: Any CPU (msil) was definitively the problem for me: Setting to x86 solved the problem
I switched publish location to C:\Temp.
The installed failed but this time told me I had an existing install from another location.
After a bit of poking around, I found I could fix the problem by:
1. Use Control Panel to uninstall my application.
2. Delete publish folder contents.
I haven't been able to figure out what steps actually produce the problem but its gone now for the the time being.
In case, any one facing similar issue with WPF application, please take a look at my answer here.
I had this problem with an old app that had some hard-to-find pre-requisites. I found that VSTO does a nice roll-up of a lot of those files (making it a simple troubleshooting step, or simple solution). It helped me with a few old computers:
Visual Studio 2010 Tools for Office Runtime:
https://www.microsoft.com/en-US/download/details.aspx?id=48217
I'm over a domain, reading the path \\machinecap\platform\in.
The platform is a share, wich leads to E:\cappuccino\platform locally. The application is a Windows Service made in C# .NET 2.0, wich make use of FileSystemWatcher to read the path \\machinecap\platform\in for files created and renamed.
I have "Full Control" permissions since \\machinecap\platform (including all sub-dirs), but only this, no access to any folder else in the server (is a Windows Server 2003).
The problem is that when a file arrives at the server, the service fall down, and no (descent) message is logged in Event Viewer. Trying to trace the problem, I made a loggon in the server and tried to run mannually all the steps that the application does. I can create files in the "in" folder, however I cannot delete these files... a error message is shown: "E:\ is not accessible. Access is denied."
Of course I don't have any access to E:\ root folder, only to E:\cappuccino\platform... is this the problem? Do I really have to give read access to E:\ in order I can read E:\cappuccino\platform?
MORE INFO
Exception message:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
File name: 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
at TestRiskStore.ArisReportReader.CreateOrRename(Object source, FileSystemEventArgs e)
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Please note that I'm using Oracle.DataAccess component.. I think the problem is related to this, not sure.... any idea how to solve this problem?
I've found the problem: my machine is 32 bits, the server is 64 bits, and I was compiling the application to run on any platform. The problem is that the OracleDataAccess components that it was installed on the server is for 32 bits, so the assemblies were installed only on GAC_32 folder. Thus when the application try to run on 64 bits mode it doesn't find the assemblies.
So I just recompiled the application as x86 (32 bits), and it worked. Now the application runs on 32 bit mode and it look for the assemblies in the correct folder.
I am getting an error about the assembly "C:\Ora10g\bin\Zip.exe". The trouble is this solution does NOT use anything in Oracle at all. I could not find a single reference to 10g anywhere in the project. I inherited this from another person who left our group. He never had this issue. Another member of my team said he got this before but reinstalling the client portion of 10g fixed it. No such luck there. I even tried using WinGrep to search the entire solution folder for "Ora10g" but it wasn't there.
Any ideas? I can't build this solution until I can figure out how to get rid of this false reference to Oracle.
VS 2005 solution. Contains a couple WinForm apps, a couple class libraries, and a web service. The error occurs in the main class library project.
Here is the error message:
Error 1 The "ResolveAssemblyReference" task failed unexpectedly.
System.BadImageFormatException: Could not load file or assembly 'C:\Ora10g\bin\Zip.exe' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'C:\Ora10g\bin\Zip.exe'
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Microsoft.Build.Shared.AssemblyNameExtension.GetAssemblyNameEx(String path)
at Microsoft.Build.Tasks.SystemState.GetAssemblyName(String path)
at Microsoft.Build.Tasks.Resolver.FileMatchesAssemblyName(AssemblyNameExtension assemblyName, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, Boolean allowMismatchBetweenFusionNameAndFileName, String pathToCandidateAssembly, ResolutionSearchLocation searchLocation)
at Microsoft.Build.Tasks.Resolver.ResolveAsFile(String fullPath, AssemblyNameExtension assemblyName, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, Boolean allowMismatchBetweenFusionNameAndFileName, ArrayList assembliesConsideredAndRejected)
at Microsoft.Build.Tasks.Resolver.ResolveFromDirectory(AssemblyNameExtension assemblyName, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String directory, ArrayList assembliesConsideredAndRejected)
at Microsoft.Build.Tasks.AssemblyFoldersResolver.Resolve(AssemblyNameExtension assemblyName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, ArrayList assembliesConsideredAndRejected, String& foundPath, Boolean& userRequestedSpecificFile)
at Microsoft.Build.Tasks.AssemblyResolution.ResolveReference(IEnumerable`1 jaggedResolvers, AssemblyNameExtension assemblyName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, ArrayList assembliesConsideredAndRejected, String& resolvedSearchPath, Boolean& userRequestedSpecificFile)
at Microsoft.Build.Tasks.ReferenceTable.ResolveReference(AssemblyNameExtension assemblyName, String rawFileNameCandidate, Reference reference)
at Microsoft.Build.Tasks.ReferenceTable.ResolveAssemblyFilenames()
at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure()
at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure(DependentAssembly[] remappedAssembliesValue, ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions)
at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime)
at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
The give-away's are "The module was expected to contain an assembly manifest" and the fact that the exception is of type System.BadImageFormatException. Something is trying to load the file "C:\Ora10g\bin\Zip.exe" as if it was a .net assembly and it either:
Isn't a .net assembly
Is a .net assembly but for a version of the CLR that is later than the one you're targeting
Is a .net assembly, but for the wrong "bitness" (unlikely given the "assembly manifest" part of the exception message).
Is corrupted
Have you:
Examined your Solution file (.sln) in a text editor to look for references to this file?
(More likely) Examined the .csproj file for the class library to see if it contains any references to this program? It could be that there's a custom MSBuild task that's trying to load that EXE, possibly to produce ZIPped output from the build process.
Verified that none of the assemblies that you load themselves reference, either directly or indirectly, the Zip.exe file?
As Dave Van den Eynde said, have you checked that the system .targets files (the files that tell MSBuild how to do what it does) are unchanged? You can find these files in %windir%\Microsoft.NET\Framework\v2.0.50727
Other things you can try:
Follow the instructions in the error message and turn Assembly binding logging on, then review the log to see what Zip.exe was loaded as a dependency of.
"Grep" your whole harddrive for "zip.exe", something, somewhere is referencing it and it may not be in your project/solution (see point 4), but it may be somewhere else that the installer for the Oracle Client has damaged/altered.
When you reinstalled your Oracle client, where did you put it? If you used the default location from the installer, your ORACLE_HOME will not be at c:\ora10g. Does the directory c:\ora10g\bin exist?
A possible workaround is to create the directory c:\ora10g\bin, and copy the zip.exe file from your ORACLE_HOME\bin directory there. There is apparently something in your project that references the Oracle zip binary in that specific location (can't help you there).
This file may be referenced by one of your referenced assemblies causing an indirect dependency.
Check if the file exisits in the directory and if it does, ensure the file also exists in the build server.
Also, make sure none of the official Targets files were changed. These are automatically imported in your build environment. Perhaps you could do a grep on them as well?
More specifically, your predecessor could have modified them to include some kind of build step into all of his projects.
Is your application actually in the c:\ora10g directory? If so .Net is going to try and load every assembly in the \bin directory whether you actually reference it or not.