29

Out of the blue I can no longer rebuild the deployment project, or refresh it's dependencies. This is related to a visual studio 2010 desktop c# application.

Nothing new has been added since the last time it worked. The only thing I can think is that I was having errors related to a DevExpress assembly which I fixed by refreshing the assembly and running the project conversion tool that DevExpress comes with based on this advice.

References include CrystalDecisions, DevExpress, and a few System Assemblies. Like I said, they have all been there for several weeks, and building the deployment project has always worked before. We are also using team foundation as our source code storage.

Full error text: The operation could not be completed. The application called an interface that was marshalled for a different thread.

Any ideas?

RThomas
  • 10,702
  • 2
  • 48
  • 61
  • Do you have a database project in your solution? – Alastair Pitts Jun 09 '11 at 00:15
  • No. I do have a linq to sql data context. But not a full blown project. – RThomas Jun 09 '11 at 00:24
  • Hmm, I had a similar issue, but it was fixed by moving the setup projects to be the last ones loaded by the solution. Maybe check the solution file (.sln) in text editor, and move the setup project to be the last one in the list (if it isn't already) – Alastair Pitts Jun 09 '11 at 00:27
  • 4
    Well, after trying to work it out and understand it, I finally pulled the programmer's tool for all problems. 3 finger salute. Reboot, and poof - problem went away. – RThomas Jun 09 '11 at 03:47
  • I've been doing this for over a decade, you'd think rebooting would be sooner in my "things to try" list. – RThomas Jun 09 '11 at 04:28
  • I got this after trying to add the C++ 2010 Runtime Libraries (x86) to my project. The first error was that it couldn't find a dependency (no hint as to what the problem was but since I just added the C++ it was a safe guess). I thought I would try refreshing dependencies and found that I had offended the course marshal. I only had to quit and restart VS2010. Then I could refresh and build without issue. – Tod Aug 29 '11 at 21:52
  • 6
    It's ridiculous that this was closed because "This question is unlikely to help any future visitors", I can confirm that, that statement is 100% wrong. It's now helped me twice! – Tod Jun 19 '12 at 02:24
  • I can confirm that a restart of VS fixed my problem (a solution reload probably would also have). Definately the workaround. – Anonymous Type Jul 18 '14 at 03:40

4 Answers4

18

The problem went away after a reboot and has not come back. Not the best answer, but just one of those things.

RThomas
  • 10,702
  • 2
  • 48
  • 61
  • 7
    I had the same problem and restarting VS2k10 (without reboot) worked. – AlG Jul 20 '11 at 15:55
  • Interesting... I had restarted VS a couple times while re-installing my Dev-Express tools. It wasn't until a complete reboot however that mine came back. – RThomas Jul 22 '11 at 23:22
  • Thanks for the question and answer. This saved me from wasting a couple of hours, I am sure. It's interesting this question is too localized??? Wow. – Tae-Sung Shin Sep 04 '12 at 21:32
  • I flagged for a moderator to re-open and they said it would need a better answer than 'reboot' to be re-opened. I kind of see their point and at least the post hasn't been deleted so... whatever - glad it helped. – RThomas Sep 05 '12 at 18:15
7

Usually a VS restart does the trick. Sometimes not, and a system reboot is necessary, but in one case I had to remake the setup project, so be prepared for that too.

Razvan Popa
  • 91
  • 1
  • 2
3

Just experienced this error, closed my solution and reopened it again, then it worked. So maybe you don't even have to restart VS completely.

Franz B.
  • 442
  • 9
  • 22
2

In my case re-open VS2010 and rebuild didn't gave me any positive results, until I opened .vdproj file with text editor and deleted all content from "Hierarchy" and "File" text blocks. Then re-adding primary output from my project + rebuild = problem solved.

Igor Lozovsky
  • 2,275
  • 2
  • 15
  • 14