Is being used by another process, so the process cannot access this file.

Source: Internet
Author: User

I believe many people have encountered such problems.

Recently, my computer seems to be a bit exhausted. I don't know why the console program only needs to be used.Start execution (not debugging)It will inevitably remain in the process

And the process manager does not see ~~

The most disgusting thing is that even restarting VS still cannot generate

 

After some attempts, the process is displayed in tasklist in cmd.

 

This is easy to handle.

Use taskkill to end the process.

Taskkill/f/im "leleapplication2.exe"/t

 

However, due to the explosive growth of my character, every time the process is stuck, it is too troublesome to execute the cmd command every time.

So I thought

You can also use variables, so you are not afraid to generate a file name.

 

However, there are still problems in use.

If no stuck process exists, it cannot be generated.

 

So I try again

Finally, I finally found that the error will not occur if I add a filter condition.

Taskkill/f/fi "pid gt 0"/im "leleapplication2.exe"/t

The underlined part indicates a process whose pid is greater than 0.

This operation is executed again. Only "information", no "error" is returned.

 

So eventually

Set

Taskkill/f/fi "pid gt 0"/im "$ (TargetFileName)"/t

No matter whether there is any process residue, it can be generated smoothly...

 

 

Although this is the solution, I still think it is possible that vs is not installed and is preparing to reinstall vs2013 ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.