I am looking for a plugin for VS 2012 that would show me which lines of code have been modified or created since the last build. Anyone know of something for this?
You could use a Visual Studio SVN plugin to view changes visually within Visual Studio.
EDIT: as mentioned in my comment below, the next closest thing to what you seek is change tracking. As you bring up in your comment it will only work for your purposes if the only time you save is when you build. I tend to save as often as possible though.
And yes, the default behavior of VS is to automatically save when you build.
Related
After updating to visual studio 2013, update 4, the TEST option is missing from my screen, I thought Visual Studio update 5 would fix it, but it did not. "TEST" is missing from my options and I don't know why.
I have tried resetting the settings, it does not help, reset settings:
I cannot add test via TOOLS -> CUSTOMIZE -> COMMANDS -> ADD COMMAND, it is not there.
What edition of Visual Studio are you working with? Have you ever had
the TEST menu present?
Yes, I've run tests before, I'm currently
at Visual Studio 2013.5 - Premium flavor
#OP answered:
I don't know why, but uninstalling Office Tools extension seems to have fixed it.
I wanted to provide an explanation for why Menu's can go missing. One reason for this is when you install another component for Visual Studio, like Team Foundation Client or in this case Office Tools extension. They "may" automatically select a different setting. To check if this is the problem:
In Visual Studio click Tools Menu > Import and Export Settings:
See here how Project Management Settings is selected, that is the wrong setting if you're a Developer.
To see the missing developer menu's reset it back to a developer setting.
Ref: http://blog.accentient.com/a-visual-studio-mystery-the-case-of-the-missing-menu-items/
I had the same issue in VS 2015 Update 2 Community and the culprit apparently was AppInsights extension (https://github.com/dotnet/roslyn/issues/11653). To provide some detail:
Noticed test menu missing in existing solution where I previously ran tests
Made a blank test project, still no test menu
closed vs and reopened. Still not test menu
Got error referencing C:\Users{username}\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
Last error in there was NullReferenceException in CodeLensIndicatorService
Googling that found link above, tieing to this add-in.
disabling it fixed the issue and test menu not appears and I can run tests.
Forgive me if I complain a bit, but if any VS team is reading: Under no circumstances should an add-in failing cause a built-in menu to not appear. As much as this is a bug caused by the the various add-ins, it is also a flaw in VS IMO- and one that is not trivial for end-users to connect the dots on.
Somehow the settings (settings have menu items configuration also) for your visual studio may have issue. Either you can try reset. Only in case that doesn't work you can always customize your menu item. so
Tool -> Customize (by default standard should be selected)
select commands tab and then menu bar option. You can see options to add commands. Under that you can select test so make testing option visible.
Also for testing test case, you can always right click on class and run it.
Hi Please try to reset all setting
http://blog.accentient.com/a-visual-studio-mystery-the-case-of-the-missing-menu-items/
If not then there is workaround to add your setting
http://blogs.msdn.com/b/visualstudioalm/archive/2012/09/11/visual-studio-2012-where-is-the-test-toolbar-couldn-t-find-it-anywhere.aspx
After doing close visual studio instances and reopen it.
I don't know why, but uninstalling Office Tools extension seems to have fixed it.
Edit: I tried to reproduce this bug, I ran the VS2013.5 update and clicked repair. The update took +5 hours, figured it got stuck. So I cancelled it, got stuck cancelling. So I ended the process. Now I started visual studio and TEST is missing, basically my visual studio installation is messed up I think.
Edit: Found the culprit, it was Microsoft Intune Endpoint Protection that was installed on my pc. It basically scanned everything and when visual studio got updated and files were written to the disk, something went wrong and corrupted my install. I turned it off by excluding C:\* from being scanned and ran VS2013.5 update and clicked repair. Everything is fine now.
Is there C# interactive window for VS 2013, or any other similar way, without installing VS 2012.
I tried C# Repel, C# Snippet Compiler and Mono Command Prompt, but, all of them don't provide the features of C# interactive window packed with Roslyn for VS 2012.
UPDATE: Found a total better alternative!!! Try CShell, it is free and open source! "A simple, yet powerful, C# scripting IDE" as they promote it.
Check my tweet which was also favorited by Scott Hanselman :)
My old recommendation was: LINQPad
Best way is to install VS 2012 and use C# interactive window provided with its Roslyn. While doing that, wait Microsoft to release C# interactive to VS 2013.
This is taken from one of the links above:
http://social.msdn.microsoft.com/forums/vstudio/en-US/0da45fe7-fbe2-4074-b52f-dc8d7c4b2ba3/c-interactive-in-vs-2013
It worked for me, so hopefully this will help the next person :)
Hi SpencerGR,
I just got upgraded to VS 2013 and wanted C# Interactive, and this is
the first hit when I searched for it, so I figured I would place my
answer here...
Didn't make sense to me that the extension from VS 2012 wouldn't work;
so I hunted down the Roslyn keys in my registry for VS 2012 and was
able to kinda figure out what was going on. After a bit of futzing
around, I finally got it working, so here's the instructions for
whoever might care to try [be warned, I'm sure this isn't supported by
MS, I take no responsibility if something happens to mess up your
computer, and so forth ;)].
Basically it was a matter of
copying some registry keys with slight modification copying some files
and this one is annoying but oh, well] there's a file you have to
change the datestamp on (I did it by opening the file in Notepad++ and
saving it out.) If you don't already have VS 2012 or you don't have
the Roslyn CTP installed you'll need to get the files somehow, and I'm
not sure if there are other registry settings needed or not, but I
imagine if you just manage to get the files out of the CTP distro it
would be enough... No guarantees of course.
Not-Instructions-Just-An-Explanation-Of-What-I-Did-I-Am-A-Trained-Professional-...-Or-Something
;)
copying some registry keys with slight modification; I replaced '11.0' with '12.0' in the keys and values, you might need to change
the paths too if you didn't install Visual Studio in it's default
location. (also posted to pastebin.com/XeP5ai8F )
Save this as a .reg file and open it to import the new keys easily:
Windows Registry Editor Version 5.00.
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\InteractiveWindows\0] "ContentType"="Roslyn C#"
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\InstalledProducts\Roslyn] ""="Microsoft Roslyn CTP" "ProductDetails"="Microsoft Roslyn CTP"
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Packages\{c5edd1ee-c43b-4360-9ce4-6b993ca12897}] "Class"="Roslyn.VisualStudio.CSharp.Repl.CSharpReplPackage" "CodeBase"="C:\\Program Files (x86)\\Microsoft Visual Studio
12.0\\Common7\\IDE\\Extensions\\Microsoft\\Roslyn C# Interactive Window\\1.2.20906.1\\Roslyn.VisualStudio.CSharp.Repl.dll"
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Packages\{f5199a4e-6a60-4f79-82e9-fc92a41c4610}] "Class"="Roslyn.VisualStudio.InteractiveWindow.InteractiveWindowPackage" "CodeBase"="C:\\Program Files (x86)\\Microsoft Visual Studio
12.0\\Common7\\IDE\\Extensions\\Microsoft\\Roslyn Components\\1.2.20906.1\\Roslyn.VisualStudio.InteractiveWindow.dll"
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\ToolWindows\{2d0a56aa-9527-4b78-b6e6-ebe6e05da749}] "Name"="Roslyn.VisualStudio.InteractiveWindow.VsInteractiveWindow"
copying some files; basically just need to copy the files mentioned above to the locations mentioned above; I just copied the
'Common7\IDE\Extensions\Microsoft\Roslyn C# Interactive Window' and
'Common7\IDE\Extensions\Microsoft\Roslyn Components' folders from my
11.0 install to my 12.0 install. easy peasy.
and yeah... there's a file in the aforementioned 'Common7\IDE\Extensions' directory called
'extensions.configurationchanged'; I couldn't get things to take, then
I noticed that file. so, as mentioned, I just opened in Notepad++ and
saved back out; I think I had to make a change to the file, so I added
a space. kinda felt kludgy, but I guess it beats VS taking longer to
load due to having to scan the Extensions every time you open it up.
So, that's it! Worked for me, I hope someone else may find this
useful, as it probably took longer to post this than it did to
actually get it working in the first place. ;) It's possible I missed
a step in here somewhere, since I had made a few other attempts before
I found the 'changed' file, so I could have possibly twiddled another
bit somewhere that was necessary that I don't remember. Should be a
good start tho.
I haven't tested it out fully by any means but it shows up in the
'View > Other Windows' list, it opens up just find, and it looks like
Intellisense is working too. Good luck and great code to all! :)
--- Chelle L.
You could also use LinqPad. You can use it to test C# code. It has built in support for loading DLLs and Nuget Packages. Its what I use personally and I love it.
It has a free version, but the paid version has intellisense and debugger
C# interactive finally arrived to VS 2015... You may need to install vs2015.1 to get it..
http://blogs.msdn.com/b/visualstudio/archive/2015/10/08/visual-studio-2015-update-1-ctp.aspx
Good luck... and happy interactive coding!
IWIH describes how to install it and which prerequisites you need.
Let me give you some
Additional information:
After you have installed VS 2015 and its updates (update 3 KB3165756 patch has just arrived) you can bring C# interactive to your screen as follows:
Either via the menu
View -> Other Windows -> C# Interactive
Or press Ctrl + Q and type into the quick launch box:
C# interactive
which allows you to click on View -> Other Windows -> C# Interactive with the mouse.
Afterwards, you have the C# Interactive beneath the error list. Here is an example how you can use it:
Quickstart:
To get help in this window, type #help and press enter.
To execute a statement, simply press ENTER. To type in multiple lines, press SHIFT+ENTER for each line, and for the last line press ENTER to execute the entire statement.
To print the values of a variable, type its name and press enter (in the screen shot, I have done this for variable q)
Is there any way to save the state of debugger in vs2005 ?
I worked really long to reproduce some bug , and I want to save re reproduction , that latter I will be able to load it again.
Any idea if it is possible ?
Thanks .
You can generate a dump from within Visual Studio and reload it later for further analysis, but it is only a static view.
However, you can't have a dynamic view unless you use Intellitrace only available on Visual Studio 2010 Ultimate (Intellitrace is only available for managed applications, not native ones).
Save the (im assuming .cpp) file in a different location then where it saves when you build your project. Open it back up when you want to see the code that caused the bug. I'm not sure of anyway to save the debugger directly but this should work for you.
This might help you: http://msdn.microsoft.com/en-us/library/aa290350%28v=vs.71%29.aspx#vstchdebugginginvisualstudionetanchor5
-Panda
I was using Visual Studio 2010 Express for a project and recently changed over to ultimate 2010. I am noticing that when I would debug in express I could put a break point, edit the code if needed and continue without having to recompile.
With VS 2010 ultimate it tells me the version has changed and i have to stop and restart. How do i get the functionality that express had in ultimate?
Thanks for the help.
EDIT: More specifically, here is the message i get:
"This source file has changed. It no longer matches the versio nof the file used to build the application being debugged".
You have to enable 'Edit & Continue' both in the debug menu (should be on by default. check by going to debug > options+settings) and possibly again in the specific project if it's a web project of some sort. It should be a checkbox there.
edit: it's been a bit since i've tried it, but as far as i recall, that's the how. i'll see if i can grab you a link.
I must have done something wrong. I have a C# project in Visual Studio 2008. All of a sudden I see a lock on my classes and when I hover the class names on the top tab I see the class name as : C:\Myprojects\Oder.cs[Read Only] !
Has something weird like that happened to you before?
In my case it was a ReSharper 9.0/9.1 related issue. After clearing the ReSharper cache, I was able to edit files in my solution again.
Clearing the ReSharper cache can be done here: ReSharper -> Options -> Environment -> General and click: Clear Caches and restart your visual studio.
(The image is contained within the first of the linked JetBrains articles).
JetBrains instructions:
Ultimate Guide to Speeding Up ReSharper (and Visual Studio) - Performance degradation after ReSharper upgrade
ReSharper Online Documentation
A couple of possibilities spring to mind:
Have you added the project to source control?
Have you marked the project folder (and all it's sub folders) as read only?
Of course, someone else may have done either of these things if they have had access to your machine.
One Possible stupid thing.
Your project is still running and you forgot that. Stop debugging (CTRL + F5)
How do I know. Guess..
Restarting my computer worked for me. My project became read only in between compiles - suddenly I couldn't save changes to files, Visual Studio started presenting me with 'save as' dialog boxes, and SVN couldn't commit or clean the project because "sqlite could not write to readonly database." Checking the file properties on the files in Windows Explorer showed that none of them were marked read-only. I was able to make a backup copy of the project, then I restarted and it was fine.
Restart your Visual Studio and add the project again. Worked for me.
Close, then reopen the file.
Still a pain, but at least it's less costly than completely closing visual studio.
You can try: file -> Source Control -> Go online
IDE-integrated source control?
Sounds like your source files are or have been under source control. Many source control systems will set files to read-only when they haven't been checked out for editing.
Total Commander makes it really easy to change file attributes recursively, but most likely Windows can also do this :)
Much in line with what Morten Mertner said, (if you by chance are using TFS Source Control like I am) I did a manual checkout of the file and it resolved the issue for me.
For me the problem is that the files are locked while the application is running.
In this state, Visual Studio 2013 displays the lock icon in the file tab and when you try to edit the file, a dialog box with this message appears:
Changes are not allowed for this module as it was not built for changes while debugging or the target .NET runtime version does not support it.
In Visual Studio 2015 as well, the lock icon appears in the file tab when the application is running. but the dialog box and message are not displayed.
Stopping the application causes the file to become unlocked.