Save metadata "CurrentBind" is invalid. mistake

In the context of a one-click application, which is debugged locally with the exception turned off when enabling "Thrown" in VS2010, I experience the following error:

Deployment Exception: "Store metadata "CurrentBind" is not valid." at System.Deployment.Application.ComponentStore.GetPropertyString(DefinitionAppId appId, String propName) 

when I execute the following line of code:

 if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) 

This exception is caught and handled by .net code, and the application does not crash after this error occurs. Unfortunately, this error is followed by:

 InvalidDeploymentException: "Application is not installed" at System.Deployment.Application.ApplicationDeployment..ctor(String fullAppId) 

If I keep going through exceptions, I get another error:

 SynchronizationLockException: "Object synchronization method was called from an unsynchronized block of code" at Microsoft.Practices.Unity.SynchronizedLifetimeManager.TryExit() @ ProvidedContainer.RegisterInstance(LoggerFacade); 

and finally:

 ConfigurationErrorsException: "This element is not currently associated with any context" at System.Configuration.ConfigurationElement.get_EvaluationContext() 

in the constructor

 [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public partial class InfrastructureDataServiceClient : System.ServiceModel.ClientBase<Infrastructure.DataServices.IInfrastructureDataService>, Infrastructure.DataServices.IInfrastructureDataService { public InfrastructureDataServiceClient() { } } 

All these errors are handled by framework.net code and do not break into the application, but as long as I have the opportunity to throw the Thrown exception, I continue to go through these errors until I lose patience and select the gap only with unhandled exceptions, after which The application will fully load.

This happened to me in the past, and at that time I had to completely reinstall the visual studio, but after that it worked fine. I would prefer not to do this as it is time consuming and my VS installation is pretty tuned. In addition, my employees do not experience the same error, so I am informed that there is something unique in my environment.

I recently tested a visual studio when debugging, and had to kill the devenv process, which could play a role, but it's hard to say because I recently turned on a break on the abandoned option. I already tried to delete the suo files, but that did not affect.

I have the following add-ons installed: Resharper, .Net Reflector, Team Explorer, TFS Power Tools, Theme Manager.

+5
debugging deployment clickonce
source share
3 answers

What I did to solve this problem was reinstall the visual studio. After that, the exceptions disappeared.

+1
source share

It seems that many other people have solved this problem simply by turning off the violation of this exception - see here , here , here and here , for example. Nobody seems to know what an exception is.

I have to add that I had to add the exception manually to my Debug / Exceptions list - it did not display by default.

+3
source share

In my case, I just reset the current settings in the Tools / Import and Export menu in the Visual Studio 2010 menu. I hope this works for you!

0
source share