can't update anything in c# - c#

Anything that i change does not reflect when i run it. i don't know what happened it just sort of happened. i can't find anything on the internet except one where it says to build the solution which i already did and it was successful but it did not solve my problem. I tried editing the text putting a lot of buttons. I can see them getting added in the designer but nothing is reflecting when i run it or click the play button. Please help me. Thanks in advance.
I am using visual studio 2013

If its a web project, Clean the Temporary Files stored in framework folder,
%WINDIR%\Microsoft.NET\Framework
If its Desktop App, Delete the Debug Folder, both in bin & obj folders

Related

C# EnvDTE and TFS massive problems

I have created a vsix plugin for VS 2015 that receives some data of a REST-Service, writes it into a file and then it adds the file to my C# Project.
Well the problem is that after the files were written on the file system and integrated to the project my user input in visual studio is blocked:
e.g. I can write for example "asdf" in a code file, but when I try to delete the text with the backspace button it is not working. Other buttons like CTRL are also not working.
The interesting part is when I close VS2015 the following error appears:
The problem is definitly caused by this line:
project.ProjectItems.AddFromFile(filePath);
project is an EnvDTE.Project object! The thing is the files were added to my project but I have to kill and restart VS to continue with my work.
I have also found a little workaround: When I disable TFS in my project all is working fine!
So my conclusion is that the problem is caused by TFS!
Can anybody tell me what I can do, to solve this problem! It costs me a ton of time to restart VS every time!
When using TFS, you need to checkout the project for modification first, use SourceControl.CheckoutItem: https://msdn.microsoft.com/en-us/library/envdte.sourcecontrol.checkoutitem.aspx
The problem here is not what you are doing, but how. Some modal window you are opening it's been locked to the screen. Make sure you closed it correctly.
This behavior it's common when using modal. Try to figure it out what window you are opening and try change it from modal to not-modal.
It will stop this problem.

visual studio 2012 is not recognizing changes in code

For some reason, visual studio (2012) is not reading any changes in my code. It will recognize an error but, for example, if I get rid of something that makes a window appear, a window will still appear. I am also unable to debug my code (I get the 'symbols not loaded for this document' error). This has been going on for a few days.
I'm not quite sure what to do. I've cleared the visual studio cache but that didn't help. I've changed the startup project settings around but that doesn't change anything either. This is all from my local machine (no source/version control). Does anyone know why this is?
I fixed this by deleting the .suo (silverlight user options) file, as was suggested in the link below, thanks #amalgamate
http://www.kunal-chowdhury.com/2011/08/why-visual-studio-debugger-is-not.html
Try Build > Clean Solution then Build
This may not be your answer and I do not know silver light, but I have found the symbols not loaded error often when the solution file lost track of where a project file was, or when a project file lost track of a library. Maybe the file is missing, or maybe someone else on your team directed it else where etc.. To fix this in project explorer, right click on the solution or project and re-add the particular reference or project (using the add menu item). You may then have to remove the old project/ or reference. You will know the references and projects are bad because of the icon next to them in the project explorer. The bad links will also be listed in the output of your build with the bad links named.

Error while publishing an ASP.NET application

There is a web app I'm trying to make publish in order to upload it by CuteFtp Pro.
I usually being doing this with no problem. But this time, I'm facing crazy error! Actually, as I right-click the solution and click to Publish using File System option choosing an appropriate path for that, finally I got an Error:
Error
Copying file Images\512px-Icon_-_upload_photo_2.svg.png to obj\Debug\Package\PackageTmp\Images\512px-Icon_-_upload_photo_2.svg.png failed.
Could not find file 'Images\512px-Icon_-_upload_photo_2.svg.png'.
0 0 GiftShop
I really don't know and have no idea about this error since there is no file by the name of
512px-Icon_-_upload_photo_2.svg.png
In fact, I never had an image by that name through the project!! What could be the reason?
I'm really getting frustrated in challenging with that error.
Anybody could help me on this please?
Thank you so much
This basically happens whenever we delete the contents from the folder but forget to remove from Visual studio solutions.
To Resolve this follow below steps:-
Go to visual studio solution explorer and right click on the specific content
exclude(yellow marked files) from project.
right click and remove those files from visual studio solution explorer.
Hoping this will help you :)
Try removing the file from your project (right click and exclude).
search for the string name of file in all the files of the project. Remove the line and you are done.
Whats the best guess is that it must have been referenced in one of the CSS you are using especially if you are using Jquery or any of its plugin..
Do one thing exclude your obj folder from project.This is the best way for those kind of errors.
In your solution explorer there is one tab with tool tip "Show All Files".Click on it and it will show you all files.
There is one another way
Update: went into Project --> Package/Publish Settings, and clicked "Exclude generated debug symbols." The project began publishing with no issue.
one more solution for you
Are you seeing the file in the project? If so right click and tell it to remove the "ghost" file from the project. Once you do that I would try and publish again.
If its not showing the project, you might be able to create a fake file with the same name (just put some text in there so the size isn't 0kb) and in the same location as the other asp files. Make sure the "show hidden files is selected" and add it to the project and then promptly delete. This would essentially fix the corruption of VS thinking the file exist.
Hope it works.
Look into your solution and exclude this image file, but remember to click on Show All Files, and try to rebuild the solution.
Update 1
I ran yesterday with the same issue, it was an image not included in the project. Please go to Solution Explorer click on Show All Files and check 512px-Icon_-_upload_photo_2.svg.png image is included in the project or not, if it in gray color so it's not included in the project and if has a yellow icon please remove it from the project.

Check In: Operation not performed Could not find file *.csproj.vspscc

I am having issues with check in my code files because of some changes I have made to the project and solution. I have renamed project files, added different project files in the solution and added many files in the existing project.
Now I am getting an error while checking in the code.
The error details are:
Check In: Operation not performed Could not find file
'....Console.csproj.vspscc'.
How do I create a vspscc file if it does not get created on its own?
Any help would be great and thanks in advance.
This looks pretty stupid on my part. I restarted my Visual Studio and I could perform the check in because Visual Studio created the vspscc file when it opened the projects and solution.
Answering my own question as fast as possible so nobody else prints my own negligence before me.
And for anybody who needs an answer as how to create a vspscc file, restart the visual studio IDE
I have also seen this in another situation (VS2012) where a simple restart didn't do the trick.
I had a number of new projects which I had added to an existing solution but in the wrong place. Undoing and re-adding seemed to be fine until check-in, where it complained that the newly added projects and related .vspscc files could not be found. It was looking for them in the original location rather than where they are now.
Resolution was to go to the Source Control Explorer, which still had check-in items against these files in their original (but non-existing) locations, as well as the files in their correct locations. Selecting these errant references and "Undo pending Changes" for these files did resolve the issue.
I'd try using File/SourceControl/ChangeSourceControl dialog and unbind (if necessary) then rebind the project to TFS to recreate the .csproj.vspscc.
I removed projects and have same issue, so my solution was to re-create the same projects with same name, then remove them cleanly :-) I hope this helps
I had a similar problem, but in my case I Visual Studio/TFS couldn't fine the .csproj file. Anyway, with the help of a colleague I was able to determine that the issue was within TFS itself. TFS may have a different view of your source code than Visual Studio does. I had created the wrong type of project (I'll call it Proj1) and deleted it from within VS. Then created the correct project type, which I'll call Proj2. When I when to check it into TFS it complained about Prog1.csproj, which confused me because I couldn't see it within VS. What I learned was that you have to go into TFS's Source Control Explorer. From there you'll see how TFS sees things. Sure enough, there was Proj1.csproj (and some other related files to Proj1). What I had to do within Source Control Explorer was undo the pending check-in's of those files and folders which I didn't want to check in and no longer existed anyway. Then TFS was happy and I could perform the check-in.

problem with Visual Studio 2010

I've been using Visual Studio to code my C# project for a while, everything is seem to be okay until today, I modified code from C# File Browser and use it in my project as component. After that I cannot change the Window Form icon (as same as I've done with others win form) when I browse the icon file Visual Studio become stop working. Moreover while I'm do the debugging with window form that have file browser, I try to test an function by browsing a file after I've browse a file VS also stop working. More and moreover sometime VS stop working by itself without any action by me. Anyone know where to seek for the cause or how to solve this.
I've solved the icon problem by using
this.Icon = new System.Drawing.Icon("icon.ico");
and set the properties of image:
Build Action: Content
Copy to output Directory: Always
after I've installed VS 2010 service pack 1 the icon problem can be solve, I can browse the icon file in properties but another fail on debugging still the same and I've got
exited with code -2147483645 (0x80000003).
which seem to be cause by the file browser library
I've recently had a lot of crashing going on also.
I was able to get my website solution functional again by deleting the Solution User Options files.
.suo files, under your profile ( OS dependent )
(My Documents\Visual Studio 2010\Projects\solutionName for xp, unless you have your .sln someplace else.)
(NOTE: You right click a solution on the start page, and open Containing Folder.)
solutionName.sln.docstates.suo
is one of them. This cleared up the problem i was experiencing, but then caused other issues.
and
solutionName.suo
Do realize, this will lose ALL settings you have made for this solution.
However, it can clear things up.
I believe that once you get a crash, you can get garbage in these files.
In some cases, it may also be necessary to delete the .sln file itself.
As always, keep a copy of these files just in case...

Categories