TFS Replace Everything - c#

I JUST want to get the latest version of a C# project on TFS and replace everything, it doesn't matter what I did on the code.
I'd Like to delete all the stuff and restart again as the way it is on the server.
Other solutions even simplier ARE NOT interesting for me.
JUST THIS ONE.
Thanks since now.

In my answer i will discuss 2 ways to get rid of the changes you made and reset back to what is in the code repo. First is the way to reset all files at once. The second method is how to do 1 single file if that is all that is needed.
METHOD 1, ALL FILES AT ONCE:
Click the Home button on the Team Explorer and see this screen:
Then click Branches to see this screen:
Then right-click the branch you want to revert your local code to and select Reset and then Delete Changes (--hard):
METHOD 2, Single file at a time:
Now you may want to just revert a single file and this is done by doing the following:
Click Home button on your Team Explorer and see this page:
Then click Changes and see this screen:
Then right-click any of the files you have listed there and select Undo Changes...

Related

File "delete" option missing from Sense/Net7

I have installed Sense / Net Following the guide shown in:
https://www.youtube.com/watch?v=640NYCFRuLk
the web works fine, I have uploaded a couple of files to the server, but the option to delete files does not appear to me, I have seen that it should appear in the "Actions" menu, but it does not appear.
Action menu options
I've also looked at "Apps", where the option should appear and I can't find it.
Image of Apps
Another Photo of the missing option:
drop down options
I am acting with the Admin user, and in the directories I have all the permissions
Photo of permissions
Updated: in Apps the folder Generic Content Dont appear, so i cant go to GenericContent/delete to see the permissions
Photo of missing Folder
The action that you are looking for is here:
Or if you want to delete multiple content at once, than you find the delete action in the toolbar
SOLVED: Reinstall sense / Net and the options already appear, it had to be a problem in the installation of the Database.

Jquery still running the previous code and ignoring changes

I have a .js file that whatever changes I do (I even delete all the codes) it doesn't recognize or run the new changes, it just run the last code I saved days ago.
Here is what I did before encountering this problem.
I made a copy of my project and save it in different folder(location) and now I deleted the original and used the copied one. I made some changes on the .js file but doesn't run the new changes. Anyone know the solution to this?
I tried cleaning and building the solution but it doesn't work.
Sounds like a caching problem, did you try reloading without cache or doing a "hard reload"?
Open devtools (F12), right click the refresh button then press "Empty Cache and Hard Reload".

synchronization between branches in visual studio 2015 and in web

it's clear when you see this pics. sorry im not good at eng. so it's a little bit hard to understand what i write it here.
git branches in website and branches in team Explorer of VS2015 aren't synchronized. aint same.
BECAUSE
we two person are working together. my remotes/origin in VS and branch in web was same at first. The problem happens when after below story.
I changed code in hotfix-2.0.0.a branch in local and clicked the Synchronization section in VS and 'pushed' my commits to remote. and clicked the 'Sync' button. (I thought that I did send commits I've done of remotes\origin in local to xxx.visualstudio.com)
I made a 'pull request' in the web. (hotfix-2.0.0.a to develop and Release)
we 'approved' and 'completed' in the web.(I think 'complete' let automatically merged to branch I selected)
As you know, branches hotfix-2.0.0 was deleted. and He who is my coworker deleted branches that Hotfix, Feature. He said I made them wrong. these are useless.
summary: he deleted Feature, Hotfix, hotfix-2.0.0.a(merged and deleted) in web.
but my branches remotes/origin in VS in local didn't get updated from web. cuz there are still remained in my remotes/origin that is shown.
I deldeted them in local then VS said
"푸시하는 동안 다음 오류가 보고되었습니다.(means error occured while pushing)
refs/heads/hotfix-2.0.0.a, TF401027: Your identity (Windows Live ID\xx#xx.xx.kr) doesn't have the Git 'ForcePush' permission for the current branch, which you need for the action you just tried. Contact your administrator for help."
But I don't want ForcePush. just want to sync with view in web.
could you guys tell me how can i solve it?
thx for read it. thx a lot.
git branches in team Explorer of VS2015
this first pic's point spot i want to show you is remotes/origin.
git branches in website
in this sencond pic, there are 4 branches.
now first pic there are 7 remote repo, and second pic there are 4 remote repo.
Coworker deleted some branches or merged in website. but remotes/origin/branches doesn't show these changes. Is there any way to synchronize between remotes/origin in local and in web about changes of branches?
"Push branch" to push local branch to the remote
"Fetch" or "Checkout" to fetch/checkout the branches from the remote repo
For branches Feature, Hotfix,hotfix-2.0, you can delete them by this way:
In Sync, click fetch.
In Branches, delete these branches (Feature, Hotfix,hotfix-2.0) in remotes/origin: select a branch in remotes/origin -> right click -> delete branch from remote.
In branches, delete the local branches (Feature, Hotfix,hotfix-2.0, feature-2.0.5): select a branch –> right click -> Delete.
I finally resolved this problem. I've tried to fetch, and push but it doesn't work. However when I click the 'sync' in Synchronization tab in team explorer, I can delete the branch in Branch tab in team explorer which was already deleted in the web site.
Thx all of guys.

How launch batch photos/images in gallery view in C#

For a project I have folders of images. An example folder might be ImagesOfDogs, and the images inside would be sequentially named (1.png, 2.png, etc.). I have a button, and when I press this button I want to open all of the images in a folder at once, in one window. I could make my own window, but I would rather use the default Windows program so the user can edit the photos. This would look like the following (just imagine that black thing is a really cute dog pic):
Let's say the path to a folder is a string titled sPathToFolderOfDogs. On my button click, I want a method like this:
private void OpenCoolPicsOfDogs()
{
Process.Start(sPathToFolderOfDogs);
}
Except that will open all enclosed files in an image viewing application, preferably whichever is the user default. I have tried:
Process.Start("PictureViewer", sPathToFolderOfDogs);
...which opens PictureViewer and does not open my photos in PictureViewer,
Process.Start(sPathToParticularImage1);
Process.Start(sPathToParticularImage2);
etc etc
...which opens each in a new window,
and possibly most creatively/desperately:
String[] arrayOfAllMyPathsToParticularImagesInTheFolder;
(put all the strings in the array)
Process.Start(arrayOfAllMyPathsToParticularImagesInTheFolder);
Which just crashed. I know opening folders in applications through Process.Start should be possible because it is done in the docs here.* Is there a way to do it with images?
*relevant code from link:
// Start Internet Explorer. Defaults to the home page.
Process.Start("IExplore.exe");
// Display the contents of the favorites folder in the browser.
Process.Start(myFavoritesPath);
Thanks!
It turns out my question was a duplicate. However, I am not deleting it, as the powers that be suggest it is best to keep duplicates up as a "signpost" informing future searchers where the true path lies.
Here is the answer to my question (or more specifically, about half a dozen equally functional answers to my question).
TL;DR: The solution I am now using is from #bruceatk in the above link.

CodedUI Test- Mouse.Click() on control dose not give expected outcome

I am using Visual studio 2010 to create CodedUI Scripts.The application under Test is a web based Loan origination application .
I am automating a part where user enter's zip code and clicks on search.
when I enter zip code manually and click on search the response is received instantly.
But when the same is done with code,Zip code is successfully sent and search button is clicked but application dose not respond.
Mouse.Click(ContactInformation.ContactInformationForm.PropertyAddress.ImageZipLookup);
Just wanted to understand if this is a playback issue and is there a alternative for using mouse.click()
Most likely, the definition for the submit button is incorrect in your recording. Open the .uitest file, find the control in question in the tree, and open the SearchProperties in the properties of the control. Verify that against the source on the page, and then try again. It's possible that the recording identified a parent HtmlDiv object or something that's receiving the input rather than the button itself (or link, if that's the case).
Personally, while I'm looking at the SearchProperties, I'd remove any properties that are unnecessary. If there's an ID or unique class for the object in question, I'd stick with that alone rather than identifying six or seven other traits that may not be correct on each run (.css styles, inner text, etc. can change depending on your app).
Just be sure you edit the SearchProperties in the UI rather than the text editor, as the .designer.cs file is recreated each time you run the Test Builder, so you would lose any changes you make directly to that file.

Categories