How to remove DBProject from my solution's sequence of build - asp.net

Any time I try to debug my web project by pressing F5, the DBProj also get rebuilt and deployed. The deploying aspect takes time and I want to avoid this. Thanks.

on visual studio, find the combobox with "Debug, Release, Configuration Manager"
select "Configuration Manager", a window will popup, uncheck the projects you dont want to build and voila.

Related

Webforms rebuild and use previous browser instance

VS2013 Upd1, .NET 4.5, Webforms
In the past I have been able to RUN (F5 or run button) my project and do some testing. I have then been able to stop the project (Shift-F5 or stop button). Make some code changes and BUILD the project (F6) and press reload in the browser and see what the changes are. Yes no debugging but I did not have to re RUN the project.
However the above behaviour has changed in that I have to always RUN my project after stopping it instead of reload in the browser. I am sure I have changed a setting somewhere. Can anyone point me in the right direction?
It will be the "Edit and Continue" setting.
Please see the answer to this this similar question

Sharpdevelop - set the default project for solution

Maybe this is a stupid question, but here I go :)
I have two projects in one solution. WinApp and ConsoleApp. If i have open only files from ConsoleApp then sharpdevelop launches the WinApp. I have to right-click ConsoleApp and choose "Run project".
How can I tell sharpdevelop which one of the two to run, by default, when I pressed F5?
I'm using sharpdevelop 4.2.2 build 8818
In the Projects window, right click the ConsoleApp project and select Set as Startup Project. SharpDevelop will then run the ConsoleApp when you press F5.

Why am I unable to Debug my ASP.NET website in Visual Studio?

I used to be able to attach to my w3wp process and Debug my web application, but this is not working anymore. I have no idea what changed to break this. I'm using Visual Studio 2008 SP1. And I'm debugging in IIS, not using ASP.NET's own server (i.e. I don't Run my project, I simply attach to a running process (w3wp).
My breakpoints simply have the "breakpoint will currently not be hit. The source code is different from the original version."
What I have tried:
Did a solution Clean.
Did a solution Rebuild.
Made sure that compilation debug=true in my web.config file.
Deleted the bin folder
Restarted Visual Studio
Restarted IIS
Restarted my Computer
Added a simple Response.Write to ensure that the latest DLL is being used. It is.
Made sure that Debug ASP.NET is checked in my project properties. It is.
Made sure that all my projects are compiled in my build configuration. They are.
But none of these help. I attach to w3wp, but my breakpoints never get hit.
Any ideas?
I had this problem recently and I ended up first making sure Visual Studio was not running at all on the system.
Then went into this folder and deleted all its content:
C:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
Check your web.config for
<compilation debug="true">...
When you "Attach to process", the Output window should show you (when showing output from "Debug") all the libraries it's loading, and where it's loading them from - for the dll's in your /bin folder these are usually copied to the \Temporary ASP.NET Files\root\ folder - where are yours being read from? Have you definitely cleared them out from there?
The only other things I can think of:
You've compiled your code in "Release" mode rather than "Debug" (not the web.config) from the Solution Configuration drop-down.
The symbol files (.pdb) are missing from your /bin folder.
On the "Build" tab of the project properties, you are in configuration "Active (Debug)", you haven't check "optimize code"?
If you click "Advanced..." on that tab, what value do you have for "Debug Info"? Is it "full" or "none"?
Responding to comment
You will find it harder to debug successfully if your code compiled in "Release" mode, and you'll often get the "source code is different" message when you've not rebuilt the symbols (.pdb files) after changes - but you say you've done a clean/rebuild, so that should cover that.
Yes, your output window will show all the framework dlls that you're referencing as well as your code - but you should see one file listed in there with the name of each project output - those are the ones to look at.
You don't have some post build event that moves files into the correct directory for your site do you that's silently failing?
I also had this problem, solved it by changing the "Attach to" code type to Automatic on the "Attach To Process" dialog. (Previously I had this set to "Silverlight Code" due to debugging a different process... it can be easy to forget to change this back.)
I know this issue has been open for some time, but I think it is the same as I experienced:
I could not debug my .aspx server side code. I had a working WepApp AnyCPU project and I wanted to link to some x86 dlls, so I created an x86 debug target. Did similar things, rebuilt, stopped the development web server, rebooted, clear temporary files, all to no avail.
Fixed the problem by changing the target folder to bin\ (was bin\x86\Debug).
Are you running any add ins that could be affecting this? Or any tools that apply post build operations to the source code that the DLLs you start debugging with have been modified post build and it actually is correct that it's not the same source code so debugging won't work?
Also have tried resetting VS?
devenv.exe /resetsettings
Edit: if none of the information has aided you here, while painful it might be worth uninstalling and reinstalling VS and SP1. If you go through this and the issue is the same afterwards that atleast assures that the issue lies in either the web.config or the project settings.
Did you check your assembly.cs file with this attribute
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.Default)]
After reflecting a optimized code you will probably get this. So you must remove this to be able to debug again.
I faced the same issue. The w3wp process took a lot of memory and did not want to be reset on web application publishing.
Press Ctrl+Alt+Delete > Go to "Processes" tab > find w3wp process and
kill it. Run the app again (if this is an mvc app, just go to a
related url to automatically recreate w3wp process).
Warnings will disappear after that.
I have tried all the below options in my Visual Studio 2013 Update 4.
Reset IIS
Clean solution and rebuild
Delete the friles from temporary folder
C:\Windows\Microsoft.Net\Framework...\Temporary ASP.NET files
Check whether the compilation tag is debug or not
But none of them worked, here I am listing down the two things which worked for me.
Disabling the "Just My Code" option
Tools ->Options -> Debugging -> General -> Uncheck Enable Just My Code.
Edit the web.config file and save (You can always create a space in any line
in web.config, that will do)
Please be noted that this solution can be Visual Studio version specific, and the both fix worked for me in my Visual Studio 2013 Update 4.
in the "Attach to process" dialog, click the checkbox (near the bottom) for "show processes from all users" and if you see two w3wp.exe processes, try the other one.
One should have a comments/description value of something like T-SQL, managed somethingoranother. This is the one you want.
I have had this problem for a while and found my solution on the MS forum (link below).
Debug Diagnostic Tool was the culprit for me, but I did not have to uninstall it. I had a crash rule set up for the w3wp process and I simply removed that rule and restarted everything.
Microsoft Forum for Unable to attach error
On OpenVMS we just used to:
Compile/Debug then Link/Debug
and that was it! Simples!!
but seriously, make sure the file you have your Debugger.Break line in, has 'Copy always' set in its Properties before re-building
I was using the Visual Studio extension VSCommands to attach the debugger (convenient). However, IIS Express was running, and I guessed it might be interfering. Sure enough, when I closed IIS Express, suddenly I was able to debug again.
Joy ensued.
In my case I had a Console Application the hosted web page in .Net Framework 4.6.1. When I added a Debug to Conditional compilation symbols, it started to work:
Make sure that "Current Page" and not "Don't open a page. Wait for a request from an external application." is checked under Properties->Web->Start Action.
add this code in your .csproj file
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

Dubuging problem in asp.net?

in my project when i build the project it is giving this message :
To debug this module, change its project build configuration to debug mode. To suppress this message, disable the "Warn inf no user code on launch" debugger option
due to this when i place the break point. break point is not working. can u help me.
Check that the Standard toolbar shows that you are working in Debug mode. This is the most common cause for this problem. This setting controls what mode the Run will use. (Too see this toolbar, right click in the Visual Studio menu area and make sure the 'Standard' toolbar is checked.)
Check that you are not running with ctrl+f5 (which equals Start Without Debugging). This does not match the error message you get, so likely not the answer.
Check that the Solution Configuration does not specify that the project should be built in Release mode. To access this, right click the solution, see properties for the solution and then review the configuration settings for your projects in the configuration dialog editor that pops up.
you're trying to debug your project in Release mode... Switch the project into Debug mode, click Rebuild and then press F5.

Visual Studio Play or Build to compile

I recently had a problem with the Issue Tracker starter kit that seemed to be resolved by using the "build" option. Previously, I would typically use the "play" button to debug my app, then just stage the files when everything was working, assuming that the last time I hit the "play" button, it had fully compiled the app.
Anyhow, I'm wondering if there's a difference between the "play" button and the "build" menu option? if so, what are the differences?
The "build" button compiles your website while the "play" button builds and fires up a browser with the default page as an argument.
The "play" button is designed to execute a assembly that is designated in your solution as a starting point. Since an ASP.NET website has no true "entry point" (like static void Main() in a console application) the "play" button simulates a similar action by opening the browser to your projects "start page".
Play button (F5) executes your application in debug mode.
Build menu is only compiles and produces your assemblies.
And one another option, CTRL + F5, it runs your application but not in debug mode.
The downside of "play" with a WebSite project is that you might miss a compiler error if the offending code is outside of the App_Code directory and you don't ever load the code that contains the error. I think doing a "build" does catch those kinds of errors.
Another gotcha to watch out for--if there are additional projects (such as class libraries) within the solution, make sure that the dependencies are set up correctly in the Configuration Manager so that those projects are built before "playing" the site. Otherwise you could make a change in the class library and then "play" the site but not see the change.

Resources