Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Saturday, January 26, 2019 3:19 PM
Recently i encountered this problem - Error why trying run project: Unable to start program - why i compile Vb.net.
i found that if i did not check "Prefer 32 bit" Target CPU options, it will have this problem, why?
when i check "Prefer 32 bit" , no such error, why?
My VS Studio version is VS 2017, 15.9.6
All replies (24)
Saturday, January 26, 2019 3:21 PM
i also faced this problem, even I checked "Prefer 32 bit", when i purposely added user defined function below:
Public Sub ABC()
MsgBox("hello")
End Sub
Saturday, January 26, 2019 4:43 PM
What version of Windows is being used and is it 32 or 64 bit. what version of Visual Studio is used?
Even though you have shown one method it feels like 64 bit references are being used.
Please remember to mark the replies as answers if they help and unmark 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.
VB Forums - moderator
Sunday, January 27, 2019 1:38 AM
I used Windows 10, 64 bit, and Visual Studio 2017, 15.9.6.
I installed Visual Studio 2017 early last year.
I never had this error last year until recently.
Sunday, January 27, 2019 6:50 AM
Recently i encountered this problem - Error why trying run project: Unable to start program
Unable to start *what* program?
Don't give us a brief paraphrase in your own words of the error message.
Show us the *exact* and complete message(s), using either Windows Copy & Paste
or with a screenshot. We need as much detail as possible.
If the program it can't start is the one that you are building, then that is
the type of message you will usually get if there were build errors. If you
try to Run/Debug a program after making changes then it must be rebuilt first.
If the rebuild fails then the IDE can't run the program.
- Wayne
Sunday, January 27, 2019 11:19 PM
it is general vb.net program which i started draft form, clicked debug, to see if the form can be shown up successfully. the form can be shown successfully with no error if i did not put my function above.
Sunday, January 27, 2019 11:36 PM
Hello,
I selected a random project for you to try if open to it. Open the the project is Visual Studio and see if you can be a rebuild from right clicking on Solution Explorer, once built see if you can run the project.
The project is from VS2017 and will work in VS2015.
https://1drv.ms/u/s!AtGAgKKpqdWjiCMVgSj58ltBc3Di
Please remember to mark the replies as answers if they help and unmark 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.
VB Forums - moderator
Sunday, January 27, 2019 11:39 PM
i has restarted few times, it does not works. i don't have this problem since day 1 I installed VS 2017 in this computer. this problem only happens recently after nearly 2 yrs I used.
Sunday, January 27, 2019 11:39 PM
Msdn forum blocked me to post the error msg snapshot.
Monday, January 28, 2019 12:04 AM
Msdn forum blocked me to post the error msg snapshot.
Then pick one of the following to share an image:
(1) Post it on a file sharing service such as Onedrive and post a link here.
(2) Go to the forums support forum and ask that your account be verified
so that you can post an image. Then wait for it to happen.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=reportabug&filter=alllanguages
Direct link:
(3) Wait for your validation to occur automatically if you're not in a hurry
to solve this problem.
If I were you I'd choose number 1.
- Wayne
Monday, January 28, 2019 1:04 AM
https://1drv.ms/u/s!Akl-lmnRBdOegrZilOenVoDvqHSZ0A
This is the link for the error snaphot.
Monday, January 28, 2019 1:30 AM
https://1drv.ms/u/s!Akl-lmnRBdOegrZilOenVoDvqHSZ0A
This is the link for the error snaphot.
This is not a Visual Studio issue, instead it' a Windows access/permission issue. Normally under the document folder you have permissions so there is something else going on outside of Visual Studio. Try my project, see if you get the same issue.
Please remember to mark the replies as answers if they help and unmark 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.
VB Forums - moderator
Monday, January 28, 2019 1:46 AM
if it is file permission issue, why i don't have the same issue when i delete the dummy function i added?
Monday, January 28, 2019 1:55 AM
https://1drv.ms/u/s!Akl-lmnRBdOegrZjUdVRVpAbcGmCjw
Another snapshot to show the problem.
Monday, January 28, 2019 3:19 AM
https://1drv.ms/u/s!Akl-lmnRBdOegrZilOenVoDvqHSZ0A
This is the link for the error snaphot.
Close Visual Studio and then start it by using the "Run as administrator"
option. Do this even if you have an administrator's account. Then try
your project again and see if you still get the "Access Denied".
- Wayne
Monday, January 28, 2019 3:23 AM
As this appears to be a Visual Studio installation problem and not a Basic
issue, you probably should post this in:
Visual Studio Setup and Installation
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup&filter=alllanguages
- Wayne
Monday, January 28, 2019 3:44 AM
if it is file permission issue, why i don't have the same issue when i delete the dummy function i added?
It still may be, I'm moving this thread to the Visual Studio forum.
Please remember to mark the replies as answers if they help and unmark 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.
VB Forums - moderator
Monday, January 28, 2019 5:09 AM
if it is installation issue, i should have this problem since day 1, right?
Monday, January 28, 2019 5:22 AM
https://1drv.ms/u/s!Akl-lmnRBdOegrZkX4hQi_kRIliqaw
i has tried to run VS as administrator mode, it still give the same error.
Monday, January 28, 2019 5:47 AM
if it is installation issue, i should have this problem since day 1, right?
Not necessarily, If part of VS got corrupted or changed somehow, possibly
during an update, or the OS changed in some way after updates, etc. then
the behaviour of VS could change.
Did you try the usual checks for possible causes outside of VS? Did you make
sure that an Antivirus or Antimalware program isn't blocking, possibly based on
program behavior? Test with any installed AV/AM software disabled temporarily.
Also make sure that the file and directory structures on the disk haven't been
broken by running Chkdsk (Properties->Tools->Error checking).
- Wayne
Monday, January 28, 2019 6:04 AM
i decided to uninstall VS 2017 and do re installation to see if it can solve this weird problem.
Monday, January 28, 2019 8:45 AM
after i reinstall VS 2017, it still got the same problem, i'm suspecting Symantec End Point is doing some blocking....
Monday, January 28, 2019 9:16 AM
i'm suspecting Symantec End Point is doing some blocking....
How much control do you have over the configuration of Symantec? Many developers
have encountered such problems in the past with different AVs and different
compilers, etc. The most practical solution in many cases is to set the project
folder(s) where new EXEs are created as an "Exclusion" in the AV's settings.
e.g. - c:\users\user name)\source\repos
If on a network you may have to get a network admin to do this.
- Wayne
Tuesday, February 12, 2019 4:22 AM
latest try result - Uninstall Symantec End Point Antivirus, then try to run again, I still see the same error "Access denied", this means Antivirus does not cause Access Denied issue?
Tuesday, February 12, 2019 5:57 AM
it seems function naming cause "access denied" issue. If i put naming with 9 alphabet above, no access denied errors.