I am using Visual Studio to build a website and of sick of not being able to load the latest page just because there are build errors in the application. This happens so many time. I make a change and reload the page only to see an old version of the page
load. Then once I determine that it must be due to some kind of build error I have to click build, wait for the build, find the error, and fix it. I would rather the application just load the page and display an error message if the build error is bad enough
to make that page return an error.
It would just work much faster for me if I could wait for errors when loading a page in the browser before trying to fix them. A lot of times the build error isn't even in the file I am working on or it is in some linked class related to some task other
than any the current page needs. For instance if there is one red line on one line of code that the page does not need the page won't load. That makes no sense. Can I just tell Visual Studio to always run the current version of the app and never revert to
the last successful build?
For your requirement, you could follow below steps to close this option and run the current application with or without build errors.
In Visual Studio please go to Tools -> Options -> Projects and Solutions -> Build and Run -> in the right-hand panel under “On Run, when build or deployment errors occur:” -> change and select “Do Not Launch” in the dropdown list then check and run your
application again.
Hope this could help you and any feedback will be expected.
Best Regards,
Rena
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
You can also tell Visual Stuido to just build the project you are working on and not build the entire solution to avoid compile errors in other projects not related to the successful build of a project and its related projects used by the project you are
working on, which is done on vary large projects where there are many many projects that makeup the total solution and several developers are working in different projects where the developer has compilable code in the other projects while the developer makes
changes to code the developer is working in.
If you were using a code repository like TFS Express, GitHub, etc. and etc., then the normal practice is to not check-in code to the repository that is not buildable to avoid problems like what you are facing, always check-in clean and buildable code at
all times to the code repository and only get the latest version out of the code repository when neccessary.
If you find the post has answered your issue, then please mark post as 'answered'.
After doing that I have been getting timeout errors when trying to connect to SQL Server even though the instance of SQL Server is on the same machine. Then it acts like I need to update it via migration even though I updated the DB by had in SSMS.
After doing that I have been getting timeout errors when trying to connect to SQL Server even though the instance of SQL Server is on the same machine. Then it acts like I need to update it via migration even though I updated the DB by had in SSMS.
After doing what?
If you find the post has answered your issue, then please mark post as 'answered'.
You are using .\SQLEXPRESS or localhost\SQLEXPRESS ? If using actualMachineName\SQLEXPRESS it might consider this to be a network request which is not allowed by default.
Else show maybe the exact error message but if a connect timeout it means that for some reason it really doesn't find your server and instance name...
Member
5 Points
209 Posts
How Can I Run The Current Application With or Without Build Errors?
Dec 15, 2019 10:50 PM|CopBlaster|LINK
I am using Visual Studio to build a website and of sick of not being able to load the latest page just because there are build errors in the application. This happens so many time. I make a change and reload the page only to see an old version of the page load. Then once I determine that it must be due to some kind of build error I have to click build, wait for the build, find the error, and fix it. I would rather the application just load the page and display an error message if the build error is bad enough to make that page return an error.
It would just work much faster for me if I could wait for errors when loading a page in the browser before trying to fix them. A lot of times the build error isn't even in the file I am working on or it is in some linked class related to some task other than any the current page needs. For instance if there is one red line on one line of code that the page does not need the page won't load. That makes no sense. Can I just tell Visual Studio to always run the current version of the app and never revert to the last successful build?
Contributor
2720 Points
874 Posts
Re: How Can I Run The Current Application With or Without Build Errors?
Dec 16, 2019 05:53 AM|Rena Ni|LINK
Hi CopBlaster,
Thank you for posting here.
For your requirement, you could follow below steps to close this option and run the current application with or without build errors.
In Visual Studio please go to Tools -> Options -> Projects and Solutions -> Build and Run -> in the right-hand panel under “On Run, when build or deployment errors occur:” -> change and select “Do Not Launch” in the dropdown list then check and run your application again.
BTW, you could also get more information from this blog Skip the ‘Do You Want to Run the Last Successful Build?’ Question when Debugging in Visual Studio
Hope this could help you and any feedback will be expected.
Best Regards,
Rena
Contributor
4973 Points
4264 Posts
Re: How Can I Run The Current Application With or Without Build Errors?
Dec 16, 2019 05:57 AM|DA924|LINK
Can I just tell Visual Studio to always run the current version of the app and never revert to the last successful build?
The answer is no. . However, why not ask the questions about Visual Stuido and its functionality in the appropriate forum?
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio
You can also tell Visual Stuido to just build the project you are working on and not build the entire solution to avoid compile errors in other projects not related to the successful build of a project and its related projects used by the project you are working on, which is done on vary large projects where there are many many projects that makeup the total solution and several developers are working in different projects where the developer has compilable code in the other projects while the developer makes changes to code the developer is working in.
If you were using a code repository like TFS Express, GitHub, etc. and etc., then the normal practice is to not check-in code to the repository that is not buildable to avoid problems like what you are facing, always check-in clean and buildable code at all times to the code repository and only get the latest version out of the code repository when neccessary.
Member
5 Points
209 Posts
Re: How Can I Run The Current Application With or Without Build Errors?
Dec 19, 2019 02:43 AM|CopBlaster|LINK
After doing that I have been getting timeout errors when trying to connect to SQL Server even though the instance of SQL Server is on the same machine. Then it acts like I need to update it via migration even though I updated the DB by had in SSMS.
Contributor
4973 Points
4264 Posts
Re: How Can I Run The Current Application With or Without Build Errors?
Dec 19, 2019 11:17 AM|DA924|LINK
After doing what?
All-Star
48730 Points
18189 Posts
Re: How Can I Run The Current Application With or Without Build Errors?
Dec 19, 2019 03:37 PM|PatriceSc|LINK
Hi,
You are using .\SQLEXPRESS or localhost\SQLEXPRESS ? If using actualMachineName\SQLEXPRESS it might consider this to be a network request which is not allowed by default.
Else show maybe the exact error message but if a connect timeout it means that for some reason it really doesn't find your server and instance name...