locked
Error using VB.net RRS feed

  • Question

  • Every so often I get the following error and I can not seem to figure out why.  I shut down VB and went into task manager but even though VB says BACKGROUND TASKS ARE STILL RUNNING I don't see them.  What I am thinking is while troubleshooting code I stop the app in a wrong way is a guess.  Any suggestion as to why this takes place and how can I stop the background process?  It doesn't happen often but every time it does the only thing that seems to correct it is rebooting my computer.  I have attached a snap shot of the message.

    Thanks,

    Les

    Friday, August 14, 2020 5:32 AM

Answers

  • Hi Karen,

    I shut down Visual Studio and when I open it again it says Background tasks are still running?? I went to task manager but it is not on the list.  So far the only thing I can do is restart the computer which is a real big pain.

    Les

    At this point your best option is to use the "send feedback" button in Visual Studio top right to report the issue.

    Note I have this happen say around 6 times in five years and restarting Visual Studio always fixed this issue but sadly not for you.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Les2011 Saturday, August 15, 2020 5:41 PM
    Friday, August 14, 2020 7:33 PM
  • Every so often I get the following error and I can not seem to figure out why.  I shut down VB and went into task manager but even though VB says BACKGROUND TASKS ARE STILL RUNNING I don't see them.  What I am thinking is while troubleshooting code I stop the app in a wrong way is a guess.  Any suggestion as to why this takes place and how can I stop the background process?  It doesn't happen often but every time it does the only thing that seems to correct it is rebooting my computer.  I have attached a snap shot of the message.

    Thanks,

    Les

    I'm not sure why nobody mentioned this yet.  Honestly I wonder if I'm not having a seizure episode and just misreading everything everybody else said.

    It sounds like you're multithreading and those excess threads aren't set IsBackground=True.  You should be able to fix the problem by CTRL+ALT+DELETE and then look either for your program's process name or look for vshost.exe and kill that. 


    Before you can learn anything new you have to learn that there's stuff you don't know.

    • Marked as answer by Les2011 Saturday, August 15, 2020 5:41 PM
    Friday, August 14, 2020 9:36 PM

All replies

  • Hi Les2011,

    Thank you for posting here.

    The problem probably related to visual studio, you can try to close your Visual Studio, then delete the bin and obj folders, and reopen Visual Studio.

    Here are two related references you may need.

    1. Unable to copy a file from obj\Debug to bin\Debug
    2. Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug

    Hope them could be helpful.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 14, 2020 7:56 AM
  • Did you reproduce it in the current Visual Studio 2019?

    Friday, August 14, 2020 8:47 AM
  • Hello,

    Close Visual Studio which releases any file locks causing this issue, re-open and now you should be able to build the project.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, August 14, 2020 11:52 AM
  • Hi Karen,

    I shut down Visual Studio and when I open it again it says Background tasks are still running?? I went to task manager but it is not on the list.  So far the only thing I can do is restart the computer which is a real big pain.

    Les

    Friday, August 14, 2020 7:03 PM
  • I am using the VB.net part of VS but it does not always happen therefore I can not reproduce this error.  The version I am using is 16.5.4

    Les

    Friday, August 14, 2020 7:04 PM
  • I prefer not to have to delete bin and obj folders if I can avoid that.

    Les

    Friday, August 14, 2020 7:05 PM
  • Hi Karen,

    I shut down Visual Studio and when I open it again it says Background tasks are still running?? I went to task manager but it is not on the list.  So far the only thing I can do is restart the computer which is a real big pain.

    Les

    At this point your best option is to use the "send feedback" button in Visual Studio top right to report the issue.

    Note I have this happen say around 6 times in five years and restarting Visual Studio always fixed this issue but sadly not for you.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Les2011 Saturday, August 15, 2020 5:41 PM
    Friday, August 14, 2020 7:33 PM
  • Every so often I get the following error and I can not seem to figure out why.  I shut down VB and went into task manager but even though VB says BACKGROUND TASKS ARE STILL RUNNING I don't see them.  What I am thinking is while troubleshooting code I stop the app in a wrong way is a guess.  Any suggestion as to why this takes place and how can I stop the background process?  It doesn't happen often but every time it does the only thing that seems to correct it is rebooting my computer.  I have attached a snap shot of the message.

    Thanks,

    Les

    I'm not sure why nobody mentioned this yet.  Honestly I wonder if I'm not having a seizure episode and just misreading everything everybody else said.

    It sounds like you're multithreading and those excess threads aren't set IsBackground=True.  You should be able to fix the problem by CTRL+ALT+DELETE and then look either for your program's process name or look for vshost.exe and kill that. 


    Before you can learn anything new you have to learn that there's stuff you don't know.

    • Marked as answer by Les2011 Saturday, August 15, 2020 5:41 PM
    Friday, August 14, 2020 9:36 PM
  • Ok Karen will do that the next time this problem rears its head
    Saturday, August 15, 2020 5:40 PM
  • Hi Andrew

    The next time I get this issue I will try your recommendation thanks.

    Les

    Saturday, August 15, 2020 5:41 PM