I added some C# files that are part of a database project, then delete the EDMX (Entity Framework File) to start again after a mess up, visual studio TFS got excited and marked the files for delete) TFS is NOT my most favourite piece of software. SO OK I think - let it delete them and I will re-add said files and check in later.
Ha ha - On "Add Existing files" (select the files) / OK --- Visual studio simply silently does not add them - it does not complain, just nothing.
NB: I did do a TFS scorch to clean the workspace after the check in having saved a copy of the directory for these kind of gotchas. So that I can emulate a clean get on my machine to correct any forgotten checkins
Maybe I should add them directly into the csproj file using notepad++
You could try to install TFS Powertools, this tool provides additional Visual Studio menu options and functions:
First, map the project to a clean workspace.
Then, copy the files you want to add to TFS to the workspace, under the correct folder.
Last, right click these file and select Team Foundation Server -- Add, you'll see these files show up in Source Control Explorer, and check them into TFS.
Related
I am missing two folders and number of files in the visual studio 2019 from my project. All these files are showing in the local commit. I tried to recover it and also tried to push to GitHub but got some errors. Is there any way to recover folders and files?
Can someone help please
Thankyou
If you right click on your Project, goto Add -> Existing Item... and select the missing Folders/Files from the explorer select window.
When publishing my web application, I get the following error:
Done executing task "CopyPipelineFiles" -- FAILED.
Done building target "CopyAllFilesToSingleFolderForPackage" in project
"ServiceManagement.csproj" -- FAILED.
Done building project "ServiceManagement.csproj" -- FAILED.
I use Visual Studio 2015. I also tried opening it in administrator mode.
One possible cause is, if you have included some files in the project that are not necessary to compile (like PowerPoint files or word files), & then removed the files from the hard drive, but forgot to delete them in the "Solution Explorer" inside Visual Studio - then "Rebuild Solution" will work b/c those files were not necessary to compile - but "Publish" will fail b/c it cannot find those files when Visual Studio tries to copy files to the publish destination.
I was able to fix it with the following actions:
Remove all unrelated scripts and libraries that you are not using on your project.
Remove all src folders on your scripts.
Since I copied the whole project script files with its corresponding directories, this was I think the main issue that cause the publishing to fail as some filenames are long.
I retain only the one javascript file and one minified file, the same way with CSS files.
If you weren't able to still solve the issue after doing the actions above, try the following (Either of this actions works for us.):
Try to rebuild the project on a different machine.
I am using Visual Studio 2015 Professional Edition so I tried the Visual Studio 2017 to build and publish it.
I kind of had this issue and was because of a corrupted file that couldn't sync in OneDrive. I had a folder that coudn't be opened or deleted with the message "tag present in the reparse point buffer is invalid". By making a "chkdsk /r /f" in a Command Prompt (w/ admin permissions) my build was fixed and I could publish it again in Azure.
I have a corrupted Publish profile.
I need to delete it. My other computer is fine, so I know it is local.
I have tried:
Clean checkout of codebase from Git (so nothing is local in my code directories).
Deleting C:/Users/<user>/AppData/Local/VisualStudio
Deleting C:/Users/<user>/AppData/Roaming/VisualStudio
Full text search of Profile Name 'MunicipalAgenda' through Registry
Full Text search through machine.
Creation of a new Windows User for Visual Studio Development.
Despite all of this, VS.NET is hanging onto that corrupted Publish profile.
Honestly I am at wits' end, and my next drastic step is to do a fresh reinstall of Windows 10. Please help before it comes to that!!!
Normally any publish profile store in particular project.
For that you have to look at following location.
Go to that project.
Project has special folder call Properties
Inside that there is a folder called PublishProfiles ( Something similar)
I also had some difficulty in getting my profile deletions to stick ... Visual Studio (2017) doesn't seem to be able to do it from Solution Explorer.
My latest attempt is to go to Source Control Explorer, open up the /Properties/PublishProfiles folder, and delete and commit the unwanted profiles from there. So far so good :)
I just noticed the files I created (.cs, .xaml, etc) are not added to Git, so my commits+push wont upload them to the repository. I know I can go to the terminal and do git add path/to/file but I want to know how can I do this from within Visual Studio.
I tried right-click the file and search for Add to source control but the option is not listed. What do I do?
I already looked it up but every Microsoft documentation is for Team Foundation and it doesn't work for me
Make sure Microsoft Git Provider is selected as your Source Control plugin (assuming Visual Studio 2013):
In Visual Studio, on the Tools menu, click Options.
In the Options dialog box, click Source Control, then click Plug-in Selection.
Select the source control plug-in that you want to use (Microsoft Git Provider).
Click OK.
Locks should appear next to your files (assuming your project is a git repository), and you should be able to add your files.
Reference: https://msdn.microsoft.com/en-us/library/axafab5c(v=vs.90).aspx
Edit: Since you already have your plugin set correctly, you likely just need to perform a commit. I don't believe Visual Studio has a seperate interface for staging changes; when you go to commit, it should list your new files as "Included Changes", and the file should have a green plus next to it in the Solution Explorer.
Any files that aren't being committed should be listed under Excluded Changes or Untracked Files below that. You can add individual files to the commit from here.
If your file is missing the green plus, I'd check your .gitignore file to ensure it's not being ignored.
I have two folders which are totally external to the solution . Consider them as some external text files i the folders, that I need to copy to setup installation path when the software is installed through setup.
However, I have only found option to add Application folders inside the solutiion (and their content files). How do I add external folders and their content in this setup project, so that it gets copied to the installation path?
If you are talking about Visual Studio Installer Setup project its pretty simple...
Right Click on the Project in Solution Explorer and open View -> File System
Select Application Folder from the left side tree, right click and say Add -> Folder
On Visual Studio 2015, simply drag and drop folders on File System view...