|
Sometimes you need to step back and look at the big picture; if you are having a problem with bandwidth it does not make sense to me to add to the network load in an attempt to regulate it.
And the correct spot would more likely be ServerFault
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional
|
|
|
|
|
I want call dll functions in thread and it uses handle object for parameter.
If I call dll functions directly, then there is no problem.
But if I call it via thread, then runtime error occurs.
I think it will be because of handle object, so I have saved handle before start thread to static variable and use this value in thread.
But the problem is same.
Please help me.
|
|
|
|
|
All functions are called via a thread: a Thread is the basic unit of execution for an app and if you don't have a running thread, you don't have running code. Initially, your code will have a single running thread, and when they stops executing your app is closed - but you can add threads to do long running functionality without affecting the user display, or to increase the parallelism of your processing. In broad principle, there is no difference between the original thread and any you add, except in .NET only the thread that created Controls can access them.
But ... your use of "handles" implies you are actually not working in C#, but in C or C++ so you would need to ask this in a different forum.
Either way, you'd need to give us a much better explanation of what you are doing and how it is going wrong that you have: Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
What runtime error are you seeing? Without this basic piece of information, any help will be guesswork at best.
|
|
|
|
|
What do your "calls" look like? You're implying you have 2 different ones.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Today, out of nowhere, I started getting this error when I run my app
System.ComponentModel.Composition.ImportCardinalityMismatchException: No exports were found that match the constraint:
ContractName Views.MainWindow
RequiredTypeIdentity Views.MainWindow
I have made NO code changes. One minute it was running fine, the next - bam! error.
ALl of the Google search hits I found talk about some kind of Visual Studio problem, but this only happens when I RUN my app, not open it. And, the message sure smells like EntityFramework, which we're using.
The message mentions "ImportCardinalityMismatchException". Never seen this before.
I following the instructions in this SO post, I repaired VS, rebooted, and all that.
Anyone have any thoughts on this?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Google points to MEF, not EF.
Kevin Marois wrote: this only happens when I RUN my app, not open it Any plugins loaded when the app runs?
c# - MEF composition import issue when using specific interface - Stack Overflow[^]
..and unless you have a hash from all libraries that your code uses, it is hard to prove that "nothing changed".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Ya I meant MEF not EF
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
So you're using MEF?
Did it "stop working" at the exact same time on other machines? Do you have yesterdays backup that you can try in a VM?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
my machine only. Nothing MEF related changed
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
|
Nothing you posted helped..Reread my posting
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
You're hopeless.
It is a Microsoft error. However the resolution is this:
Clear the Visual Studio Component Model Cache. Delete or rename this folder:
%LocalAppData%\Microsoft\VisualStudio\11.0\ComponentModelCache
or
%LocalAppData%\Microsoft\VPDExpress\11.0\ComponentModelCache
and restart Visual Studio. The issue will have been resolved.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
There's no place here for insults
go back and reread
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Quote: “No exports were found that match the constraint” error in Visual Studio
I could go on, but it's "hopeless".
The fact your "turn-around" time was so short, you:
a) didn't read it
b) and can't be bothered
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I spent 2 days researching this Google hits are all about some kind of VS problem.
So let's just assume that you're here to troll, and not help, so unless you have a serious response... don't.
if you dont have a solution to the problem, dont reply
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
You think your snotty replies should go unchallenged? No problem in the future.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
So I'm not sure why you took my responses the way you did, as I certainly didn't mean any offense.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: So let's just assume that you're here to troll, and not help, so unless you have a serious response... don't. Not the first time you utter that accusation.
In the previous thread you keep hammering on the idea that nothing changed; in which case, the output and behaviour would be the same still, so evidently, something changed. Most of the stuff I read keeps pointing to a change in VS MEF by NuGet, and you stated it only happens on your machine.
So you broke your dev-environment; if you don't have the patience to evaluate suggestions, your best course of action is to rebuild a clean dev-environment. I'd first be trying to get rid of anything MEF-related and redownload only the stuff that's needed.
That is, without using NuGet for anything, and installing stuff by hand so you can control exactly what is installed.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I didn't mean to offend anyone. But as I said in my OP, I tried the Google result suggestions. None of what worked. Those posts all say that when VS was opened, the error occured. That's not what's happening here. I can open VS and run other apps with no issues.
It's just this one app that throws this, and only when I RUN the app, not open it.
And As I said before nothing changed. Literally NOTHING. At least in VS or the code. I was working Friday afternoon. Monday morning this started. I guess some Windows update could have been applied. But what Windows update would only affect THIS app?? So I serioualy doubt I 'broke' my dev environment.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: I didn't mean to offend anyone. Neither did I, so sorry if my bluntness did. Still learning to not take some stuff personally.
Kevin Marois wrote: Those posts all say that when VS was opened, the error occured. That's not what's happening here. I can open VS and run other apps with no issues. Any MEF in those other apps? I'm guessing that VS loads some package on demand, and seriously dislike the idea that it auto-updates some dependencies.
The WinForms-designer (and the controls on it) are also only loaded if you open the form using the designer; since I don't use it, some errors only pop up when running.
Kevin Marois wrote: I was working Friday afternoon. Monday morning this started. Turned of the PC when you left?
You probably have the project under source control. Did you also check in the built versions, or are they excluded? If you haven't changed anything, then one of the dependencies probably did. And yes, very frustrating if something changes under your feet.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
OK, so I completely removed all the source from my PC, rebooted, got lastest from SCM, and voila!! It now works.
It doesn't make any sense, but now it works.
Thanks for all your help
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Good to hear it's working again
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
How are you starting your application? Is this being run from inside Visual Studio or Explorer? I have seen similar issues in the past when I am running from VS if I have a dependency on a NuGet package that uses MEF where I need to physically delete the bin and obj folders and then do a rebuild. Sometimes I have had to empty my NuGet cache beforehand as well.
|
|
|
|
|
I'm runninig it from VS.
Last Friday it was running. Monday I came and and attempted to run and this error started showing up. Between Friday and Monday there were no changes.
As I said in my original post, I tried the Google result fixes, which all seem to point to some kind of VS error when OPENING VS. I can run other solutuins. This is NOT a Visual Studio problem. The message sure seems like MEF, which the app is using.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|