My application will no longer run - vb.net

My application was running fine. I went to lunch and just came back and now I keep getting this.
Severity Code Description Project File Line
Error Unable to copy file "obj\Debug\WindowsApplication4.exe" to "bin\Debug\WindowsApplication4.exe". Access to the path 'obj\Debug\WindowsApplication4.exe' is denied. WindowsApplication4
I rebooted, restarted VS, copied contents to another directory, installed the latest VS service pack. Other applications continue to run, even ones that I had open at the same time this one was. So its specific to this application. Nothing changed between working and me coming back from lunch.
Any ideas? I got way to much here to lose things.

Related

C# application runs in the background as a process now i cant build the solution and cannot even kill the process

I ran into a very weird problem today with my C# application. I downloaded it today (from a trustworthy source my classmate sent me back the program we do together) At first when i tried to build and run the application, the whole visual studio got frozen and the app didnt even appear. After a lot of trying this problem just disappeared all of a sudden. However, now I cannot even build the solution, because I get the "unable to copy file because it is being used by another process" error message. I checked the task manager and the program runs in the background. I cant kill it because I have no access to do that(access denied message), I cant do that with a terminal command either(Because the terminal says this exe file is not running) and what is more even restarting my pc 2 times didnt make it disappear. It is no more in the processes after a restart, but i can still see it in the details view of the task manager.
I just have this program running in the background literally forever now?
Someone could explain me what even happened and if there is any way to solve it? I could even code (and build) the program for a while!

Whys is IISExpress giving 404, when server IIS works

I am using Visual Studio 2017 version 15.8.7 on windows 10.
This issue is happening for Asp.net MVC 4 websites and Web Api 2. Not for Aspnet.Core sites (so far)
Lately I have been having issues where I will be debugging a website and it will work fine then all of a sudden the next time you start the project up, it gives a 404 error. The only way to fix the error is to use a different computer, create a new project and copy the info over.
Every time I start the debugger and get 404, this event is recorded.
The directory specified for caching compressed content
C:\inetpub\temp\IIS Temporary Compressed Files\Clr4IntegratedAppPool
is invalid. Static compression is being disabled.
Things I have tried.
Uninstal VS / IISExpress and reinstall, including delete all folders in program files
Create a new project and copy code over. (works, but then happens again later on)
Use different computer. (works, but eventually that computer hits the issue too)
Tried creating the temporary folder and giving "Everyone" full control of it.
Tried changing port number and re-creating virtual directory
Tried deleting entire solution folder and re-cloning repo.
The issue does not happen on the web servers, only locally.
Any idea on what is going on? I can't find any configuration that is telling IIS to compress the files, so not sure why I keep seeing that error.
Edit
I determined that the application_start even in global.asax is never firing (StreamWriter code in it to log to a file in case debugger issue). So I assume the 404 is because the routes never get registered.
I tried updating Microsoft.AspNet.Mvc to the latest 5.2.6.
Edit 2
So I found a workaround. I installed IIS locally and publish to a folder and debug by attaching to the process. If I point IIS directly at the project or use IIS within VS it doesnt work.
I think the issue is related to some dll goofiness, project seems to work once published.
Edit 3
Found the root of the problem. I use Ubuntu/bash on windows. Cloning the git repo through bash seems to be setting the permissions wrong. If I clone through command line, the issue does not happen. Now I need to figure out why bash is screwing up the file permissions.
Same issue with VS2017 on Windows 10, default IIS Express and git for Windows. Suddenly iisexpress returns 404 on /Default.aspx!!??
Solution:
Close VS2017
Delete the git repository in the file system.
Open VS2017
Clone the git repo
this helped on my machine.

VBA /Visual basic projects/macros issues while compiling

I have so many problems with any of the VBA/VB projects, that I am by now not sure which category these problems falls in. Some of the issues listed below may or may not be interrelated. But any thing that is related to visual basic project is causing me so many problems since 1 year.
I have researched so many time but have not got a solution till date :(.
But this time I could not stand it any more and therefore I am here to post it.
I had Microsoft visual basic 6.0 installed in my system last year. I was able to create some small windows based forms->compile and run as well. However, when I have a project from external resource for supporting VB applications, none of the project were compiling and running through IDE.
So i researched a lot and found the below issues:
Missing references/missing dlls. added references but no use
Tried help got this error: msdn collection does not exist please reinstall msdn
Tried Compiling - got error:
Compile error: cannot find project project or library
Tried adding components : failed by getting error Dlls are not registered.
Error in project loading, found the below error
Then I tried registering the MSCOMCTL.OCX file through regsrv.exe but it gave admin related errors as below
call toDllRegisterServer failed with error code 0x800280c
Even though I have all admin rights and I am logged in as admin for command prompt.
I also had copied the files from syswow64 to system32 or vice versa whichever way it did not work
Somewhere I had googled that we need to unblock the files to register , but these files were not blocked.
Tired, I just left the problem just like that due to other prioritised work.
But again today my colleague gave me an excel sheet which had macros written in it.
These macros do not run, instead it redirects me to Visual Basic for application IDE where the first window i get is Compile error followed by automation error
Again I thought of researching more on to it, and finally found from SO only that we should be registering MSCOMCTL.OCX.
But no matter what I do, I am unable to register any dlls.
Can any one tell me what is causing so much of compile issues , the solution and why I am not able to register any dlls or files?
And by the way, my system is window 7 64 bit and I seem to be only one in the workplace having this problem.
This issue was present even before any updates. The same profile with the same updates are running in my colleague's system. Even though there were no patch updates etc.
Try this:
Open a Command Prompt:
Open START menu, in Search box enter: cmd.exe, a link will shows, BUT doesn't press Enter key, instead RIGHT-CLICK on the link to open context menu, then choose Run as administrator
A Prompt DOS (black) windows will open on C:\Windows\System32 folder.
If your OS is 32 bit then type the below commands:
regsvr32 mscomctl.ocx press Enter
regtlib msdatsrc.tlb press Enter
If your OS is 64 bit, need to navigate to C:\Windows\SysWOW64 folder: Type the command:
CD C:\Windows\SysWOW64
then press Enter key to confirm.
Type the below commands:
regsvr32 mscomctl.ocx press Enter
regtlib msdatsrc.tlb press Enter
Now should working
HTH

Unable to install My program. Mostly has to do with Crystal Reports

Okay, This question has probably been asked before but I can't seem to solve it with anything that I've seen.
I published my program and tried setting it up on another computer. At first it gave me this error:
"Unable to install or run the application. the application requires that assembly microsoft.reportviewer.processingobjectmodel version 9.0.0.0 be installed in the global assembly cache (GAC) first."
After searching I found that including everything in the 'Application Files' before publishing made that go away, only to be replaced with
'Application cannot be started. Contact the application vendor.'
After searching and doing a lot of things on the computer that I want this program to be setup on, I checked (Crystal Report Basic For Visual Studio 2008 (x84, x64)) in the Prerequisite.
On the Computer that I need this program on, it won't download this at all. It gives me a message box to either retry or cancel.
Some pages suggest that the Crystal report package that automatically downloads is not the right one. When I tried following what is said here, I got stuck because the links won't open.
Any help appreciated, It's frustrating because I've been working on this program for months and I get stuck on the last step :/
oh .. and ... I don't know if this has anything to do with this, but I built the program using Windows 7, then updated to Windows 8, then updated to Windows 10.
I finally managed to make it work :)
Here is what I did:
I followed this video and I was able to install my program to the other computer.
When I opened it, I got a problem that the program can't find my MS Access DataBase, so I went to the setup project -> Right click -> add -> File, And I navigated to my original project's folder and added everything in there, and Viola! ... It works :)
I hope this helps somebody else :)

VB 2013 Error when trying to load designer or code for form "Make sure the application for file type (.vb) is installed

I have worked on an application for some time now and after booting up my PC today, entering VS 2013, opening my project and trying to load my main form an error popped up.
There is no editor available for (Location of form) Make sure the application for the file type (.vb) is installed
I have not uninstalled anything since last time the form worked, which was yesterday. My PC has a thing of sometimes randomly turning off, I don't know if that could have anything to do with the problem. I see several people with the same problem but they all seem to have a fix.
Involving re-installing some content that you have uninstalled and I do not think that is the case for me. When I execute the program VS prompts me saying that there are build errors, if I choose to run the last successful build the program works completely fine, but I still can't access the designer or code window.
This may be due to some reference file missing . Please make sure that all the references for the application is correctly added. If there is some file paths are shown like 'System can not find the reference specified' ,then remove the same and add them again from the correct path.