I am able to add one separate file , make changes and the change is reflected in Team explorer in visual studio. I am able to push file to repos successfully. But When I try to add one folder , the files and subfolder present under the parent-directories are not reflected for changes in visual studio.
Kindly let me know if I should change any settings before making this commit
Step By Step Process
1. I am creating new repositary in azure artifacts
2. I am opening my visual studio --> Team explorer --> connect to server .
3. I have connected to my server and cloned it to my local . local repo is created
4 Now I copy my workspace and paste it in local repository. My workspace contains many folders and sub folders are present in the workspace.
5. In visual studio --> changes --> I am able to see only main folders or parent directory. (sub folders and files available in subfolders are not available in changes).
6. I committed and pushed the code.
7. Now in artifacts in repos , only main folder or parent directory is present, sub folders are not available.
According to your description for detail steps, there is nothing business with Azure Artifacts. Which used for Code once and share packages across your organization. Host your private Nuget, npm, and Maven packages with Azure Artifacts for more reliable, scalable builds.
Are you just talking about version control. There should be something wrong with your source control binding.
Do not directly copy and past files.
Suggest you to follow the official tutorial to add files in server.
Related
I have an old project that uses GitHub as the git repository.
I've just made some changes to that project and now I need to update the repository.
But, after buying a new computer earlier this year, Visual Studio no longer knows about any connection to that repository.
So how can I fix this without losing any of the changes I just made? My two primary options given are Create Git Repository and Clone Repository. I don't think I want either of those.
Apparently, the hidden .git folder is missing in the project, which identifies a folder on the disk as git repository. Without this folder, no git commands will be available (whether from the command line or any GUI tool).
I suggest the following steps to resync the project to github:
Check out the project from github to a new folder
Set the checkout folder to the branch where the project was when the .git folder was lost (since it's an old project, you can probably take master)
Copy the contents of the existing source folder into the checkout folder. Make sure not to copy any hidden .git folders if there are still broken leftovers.
Verify and commit the diff.
I have created a C# project. I have created a Bitbucket account and want to put my project there.
What all should I put in the repository and what not to.
I am guess Debug and Release folders should not be uploaded. What about..
- Name/bin/Debug
- Name/obj/Debug
Thanks
It's a good idea to start with an established .gitignore file. GitHub has a project that maintains .gitignore files for various environments, including Visual Studio.
https://github.com/github/gitignore
Scroll down and grab VisualStudio.gitignore. Or you can download the file with this PowerShell command (set the current directory to the root of the repo, first):
(Invoke-WebRequest 'https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore').Content > .gitignore
This should give you an idea of what the general consensus is on what belongs in source control and what doesn't in a Visual Studio solution. In particular, this will exclude the bin and obj folders so you don't commit outputs to the repository, as well as the .vs folder and *.user files, which are user-specific data. It also excludes files and folders used by popular third-party extensions that maintain their own user-specific data.
Once you have a good .gitignore file, you can use git add --all and it will add everything that's not ignored to the index.
Nothing in bin or obj should need to be committed. You'll also need csproj files and nuget package config files (be they xml or json). Things like appconfig files, and .vscode are up to you whether you want to have them in source control.
i have a little problem using gitgui for a Visual Studio project...
there is a .gitignore file in the original Repository to exclude temporary files / the obj folder.
I tried cloning (Full Repository Clone) to my Home Folder from a network drive (Server Drive) - changed something. Tried to Commit it - it still commits the obj folder, i tried deleting the obj folder and get the error:
Pushing to I:/VPR/GIT/BrainFAQ_V3
To I:/VPR/GIT/BrainFAQ_V3
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'I:/VPR/GIT/BrainFAQ_V3'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Maybe anyone can help me how to fix this.
Follow below steps
Connect Visual Studio with Git Server
Clone in Local folder of your system
Open the solution that just got retrieved from Git Server to your local system
Do the changes and build the application.
Delete the folder you do not want to commit in Git from Visual studio, your .sln file of project will get changed accordingly or can use .gitignore and specify the files that you do not commit to Git Server. For More refer https://help.github.com/articles/ignoring-files/
Now, commit and push the changes to Git Server
Step 6 will be success only if there is not commit happened on master branch from the time you cloned the application.
I deploy my MVC site via a web publish within VS 2013 to an Azure location. I have published many times without issue from the same machine and IP address, but yesterday it stopped working.
The publish is placing an old version of my projects .dll in the bin folder on the site. This version no longer exists on my machine, it isn't the projects current Git state (and has never been the current Git state) and is not the version in my Release, Debug or Demo compiled folder. I don't know where it's coming from.
So when I publish, I get errors relating to the database changes because the model behind my context has changed since this old version.
So currently when I publish I have to FTP into my site and replace the WebPortal.dll file with the one in my machines bin folder, and the the site works fine.
What could be causing it to revert to this old .dll and where is it coming from? Have I somehow excluded my changes past a certain point from the publish?
Note - My views are publishing absolutely fine, it is just the .dll that should contain the current compilation of Models, Controllers etc., but instead contains an old version missing loads of stuff.
JK
There might be an old version of your dll on the server that is not being overwritten during publish. Have you tried checking "Remove additional files at destination" the the settings section of the Publish dialog. That should remove all the files from your target location except the one you publish.
If you are still having a problem after that try publishing to your local file system so you can see exactly what publish is sending to your server.
Update:
Steps to publish web application to file system.
right click on your project in the solution explorer menu and select Publish.
In the profile section of the Publish Web menu select Custom publish type, click next.
Select file system in the Publish method drop-down. You should see the target location text box where you can specify your folder.
Continue with the rest of the publish steps with you usual settings and click publish.
Double check that your Build (Menu) > Configuration Manager > Build Configuration for Release has the tick next to Build for the WebPortal.DLL. If it isn't set to build then it would use an older version.
I had the same problem. Goodness knows where the old dll is coming from but in the end I up-versioned the library to a higher number and it seemed to cure it. I suspect the GAC or temporary files might be part of the problem although I can't find my library there.
I have a new application i would like to deploy to a Managed Server I have recently signed up for. I would like to know what would be the best way to deploy to it. In my experience I have seen that many of the asp.net applications just push dlls to the server. How is this achieved?.
I have Tortoise SVN as my subversioning system. I have a repository on another server and usually i commit my changes and then update my release folder in the managed server but this has all the .aspx, solution and other files I belive are not needed. How can I do my set up so that I only push the dlls and when updating that only dlls are updated?.
I am not too clear on this and would like an explanation and best practices given this scenario.
I have faced similar questions before and follow the below steps every time I move the compiled files for incremental fixes in my application.
Maintain two separate copies of the solution files - Local Application and Production application
//This is very important because once you go to production environment. One copy for your local working and other copy only for deploying in the live server. This copy should be up to date with your live server copy.
Make the changes to files and compile and test the application in your local application folder/solution. Now commit only the files that you edited. SVN will take care of this. It will show you a possible "red mark" for the files which differ from the updates present in the repository. In this way you can track the pages which were modified.
Now open open your production solution folder and update the folder. This will update the files in production application folder.
Now compile and test the changes done. Verify if its issue is fixed or the changes are reflected same as the Local application copy. Now build the application and publish to a folder.
To know the modified files:
DLLs:
Go to the bin location of the folder and "order by" modified date. These are the dlls which are to be copied and replaced with in your life server.
ASPX/ASCX
a) Open SVN of production application folder. Right click and click show log. This will show all the files modified/updated with date. Select the ones last updated and note down the location.
b) Now navigate to the location in your published folder and select those files "ordered by" descending/ascending modified date of the files. Replace those files alone to your LIVE server.
Note: This is certainly not the best possible solution, but one of the general practices followed throughout the industry. There are few other plugins which can track changes and publish the relevant files to your published folder. But again ,this is applicable only if you have the source codes and application files in the same machine as of the one you are hosting the application from. Let me know if you have any question in this.
You can just use visual studio web deploy, it will automagically figure out what needs to be updated and only pushes what is necessary unless you ask it otherwise.