Debugged Line is not getting Highlighted in my cs-html page - asp.net-mvc

The Debugged line is not getting highlighted in the cs-html page. It works perfectly when i am debugging in the cs page but unfortunately its not working for the cs-html page.
I tried changing the font size or background color from the Options->Fonts and colors.But still its not working.

Please check if you could get some help from this thread.
And I think what you mean is: When you set a breakpoint in the .cshtml file, the highlight does not work instead of during debug mode.(Any misunderstanding please correct me!)
If you set the breakpoint in the .cshtml file but no highlight you can try closing VS,go C:\Users\lancel\AppData\Roaming\Microsoft\VisualStudio to delete all 15.x folders. And restart VS to resolve it. (This solved the issue in my side, and you can try other suggestions from the link above)
If what you mean is the highlight not work in this situation:
Please go Tools menu=>Get Tools and Features to open installer and choose repair VS.
Any update please feel free to let me know:)

Related

How to disable Notepad++ Auto-open previous files without opening Notepad++?

How do I stop Notepad++ from loading all files from the past session?
I know how to do that settings in Notepad++, but the problem is that I once opened a very large file (>10GB) and made the Notepad++ hang up. Notepad++ has already marked that big file in the session and therefore hang up everytime I start the Notepad++. Is there a way I can stop it from loading the past session so it won't hang up every time?
P.S. I have received a report on possible duplicate with this question. This is obviously a different case. At least in that question the notepad++ still starts up normally while in my case I cannot even change the settings normally because the notepad++ just hang while loading the stored version. The answer to this question also provide a good way to change the settings without starting Notepad++, which will be useful in fixing problems caused by settings when the Notepad++ cannot starts normally.
Yes, you can change that setting by modifying the config file.
go to %appdata%\Notepad++
and open config.xml
You should find the following line in there:
<GUIConfig name="RememberLastSession">yes</GUIConfig>
just change it to no and that should do the trick.
Start from command line:
notepad++ -nosession
"Auto-open previous files" then should be disabled
This is for those who do not want to modify the XML config filess, and this will also work without having the Notepad++ in PATH.
As I do not have enough reputation to comment on other answers, I'll add on Jacques Hubart's comment, all credits should still be for him.
Open Windows Run (Windows + R)
Type in the full path to the Notepad++ EXE.
This would normally be C:\Program Files\Notepad++\notepad++.exe
Add the nosession parameter
Run
Preview:
If, like me, you left a huge file in the last session, you can also remove just the offending file from the session and keep the rest.
go to %appdata%\Notepad++ and open session.xml
Scroll to the right to see the filename. Be careful to keep the integrety of the XML by removing the entire "file" node. It should be on a single line.
There is also another way from GUI
In Settings/Preferences/Backup uncheck the "Remember current session for next launch"
As suggested use notepad++ -nosession from run to open notepad++. Then go to preferences --> Backup --> Uncheck Remember current session before next launch
Close notepadd++ and open it normally without run. It worked for me.
another possibility is that the window is on an other screen not visible anymore due to starting it in a new multimonitor setup.
in that case, you have to bring the windows in the visible area by:
select the window by Alt+Tab
Alt+Space opens a small menu in the top left corner
Arrow-Down and Enter selects ' Move'
Arrows brings it back

Why does the angular-material `Getting Started` example not actually work?

Is it just me, or is the angular-material "Getting Started" example broken?
On that page (link above), there's an inline codepen to show using angular-material. But the demo doesn't work! (In particular, I don't see a button to collapse the sidebar.)
Since I used this example in my started project, I spent quite some time troubleshooting it -- to no avail. Then, I realized the example itself it may be broken. And sure 'nuff, it is!
Does anyone know what the actual bug is, so I can work around it on my test app? It must have worked at some time; but I can't figure out why it's broken now.
Thanks!
That particular pen is working fine for me but I have noticed a few are not working, and it's due to the angular-material.js link being incorrect in the dependencies (under the pen's settings) the link provided redirects to the CSS.
This is intentional - the sidebar only becomes collapsable on smaller screens and is open on larger screens. Shrinking your browser window will show the collapse button.
That being said, the Getting Started page is definitely in need of an update. It is a good guide for a basic page structure, but the individual demo pages will be a lot better if you're looking to try out some of the components. (Every demo has a CodePen link to open an editable version.)

What causes the asp.net Cannot create/shadow copy error?

Several times a day I receive this error while running my asp.net mvc4 project. I am not asking what that means, or how to fix it, but what am I doing to cause it? It is really starting to bug me, and if I can cause it to go away by altering my workflow I will.
Cannot create/shadow copy '< assembly >' when that file already exists.
As I mentioned above the project is an MVC4 application. My workflow is typically.
Make a change (code or html)
If it was code, rebuild the project (using keyboard shortcut CTRL+SHIFT+B)
refresh the page
see annoying error
clean the solution
rebuild solution
refresh page
verify change
goto 10
(I get the error with/without the debugger attached.) I will be eternally grateful to anyone who can inform me on how to avoid this error, and will promptly tweet your praises
I find this annoying too. It seems to happen when you try to refresh the page in a browser before the build is fully complete. Try counting to three-one-thousand after build is complete and then refresh in the browser. Create/shadow copy should be done by that point.
I also don't think you should need to "clean solution". I believe a rebuild is a clean + build, so you may be cleaning twice.
After a bit of research, I also found this pre-build event which seems to be popular. (this workaround does not seem to work, perhaps it did in previous versions of VS / .NET framework)
Update: alternate solution
Another way to get by this is, when you see the YSOD, just type in a different URL in the browser and load it instead. Then click the back button and refresh to get to the page you were trying to reload in the first place.
What's causing this error seems to be doing the shadow copy (stating the obvious...), ie generating a file in one folder and then reading it to copy it elsewhere. I think what's causing the issue is generating or not that first file, and when/how it's copied, regardless of what your actions are. Does this first file (that will be shadow copied) needs regenerating, and therefore re-shadow copied?
This post says:
By default shadow copy is enabled on every appdomain created by ASP.NET. Assemblies loaded will be copied to a shadow copy cache directory, and will be used from there. So that the original file is not locked and can be modified.
And their fix is to prevent shadow copy. But I don't personnally fully understand what shadow copy does in the asp.net context, maybe someone can clarify if there are any bad side effect to disabling it:
<configuration>
<system.web>
<hostingEnvironment shadowCopyBinAssemblies="false" />
</system.web>
</configuration>
This post talks about disabling indexing and/or antivirus, which would suggest that building the project generates new files, and the antivirus (or indexing service) accesses them and locks them, just when the shadow copy is trying to copy that exact same file.
I get his error regularly and never found what specific action I do causes the error. I make a code change, press F5 (Run/ Play button), get the error in the web browser, close the web browser, press F5 again. It now works. I don't clean, I don't rebuild. However, with the second F5/Run, I believe VS detects there's been no code change, and therefore, maybe the shadow copy is not redone? Or maybe this time the shadow copy is timed slightly differently and it works.
I received this error after adding a new image to my web project.
In VS, each image has a property entitled "Copy to Output Directory". I chose "Copy Always", then I got the message.
I changed it to "Do Not Copy" - now it is happy.
Hope that helps someone.

How do I set a Notepad++ variable?

Printing code with Notepad++ is very handy because of the syntax-highlighting.
Unfortunately I'm experiencing a problem with printing.
Now at the left top of the page $(FULL_CURRENT_PATH) is printed, which is, D:\cppWorkspace\project1\display\GUI\main.cpp
I don't want the whole path, to the project, to be printed. However it also should not only print the file name.
In this case it should be, display\GUI\main.cpp. (which are packages inside the project and the file itself)
I tried to edit or set a Notepad++ variable, but I couldn't find a way to do this.
Hopefully someone knows how this can be fixed.
Thanks in advance,
Dennis
Unfortunately the variables are fixed, and cannot be "set" - at least as of the current version (6.3.1). They are simple replacements, handled in the expandNppEnvironmentStrs method in RunDlg.cpp
You're welcome to suggest an idea on IdeaTorrent (see the hosted apps menu on the Sourceforge project), or vote a similar idea up if one exists.

Can't get sIFR to display

I can't get sIFR to display. It just shows the regular web text. I've went through the steps several times.
Maybe I'm just missing some tiny bit of code, but I think I've followed all the steps correctly. Just can't get it to display.
Anyone want to look and see if I'm just screwing up some mundane detail? Here is a link to my test page
Test Page
Any help would be appreciated!
You're including the config file before the main library file. Try to switch it around.
If you're in Firefox, you can look at the Error Console. Where it says.
Error: sIFR is not defined
Source File: http://www.creativewhirlwind.com/reallynewversion/sifr_test/js/sifr-config.js
Line: 25
You should also look at using FireBug.

Resources