Add single solution with multiple projects to Github via Visual Studio - github

In Visual Studio 2019 is it possible to take a solution with multiple projects and upload it into a single Github repo without having to move one of the project's directory?
Is there a dependency setting somewhere in my "startup" project that will include my other project (.dll) and push all of it to a repo?
Thank you

This sounds like you need a git submodules. Refer to this solution and perhaps this YouTube video.

Related

Pushing Xamarin forms to Github

I'm trying to push my xamarin forms project to github .
I've tried the regular method following the github instruction & using command line but xamarin forms project usually are big in size so that it won't be pushed throw the CMD and it recommends the Git LFS instead.
however, I found that we can push the project to github
https://devlinduldulao.pro/how-to-use-git-and-github-in-xamarin-development/
using the GitHub Extension for Visual Studio and I have installed it but the second step is to add the solution to source control.
but I cannot find the latter option in my menu
so can anyone help me with this problem, all I need to do is to push my project to github if there any other option than the one I have provided in the article above please mention it.
thanks in advance.
If its trying to push a lot, then you are missing a .gitignore file. Put this in the root folder of your solution.
Here is a github list of useful gitignore files.
A good one to use for this purpose is VisualStudio.gitignore.
At minimum, have these lines in your .gitignore file:
[Bb]in/
[Oo]bj/
.vs/
bin and obj are the main folders containing results of building. These are re-creatable from source files, so should not be in repo.
.vs is where visual studio keeps all its user-specific files (such as .suo).
This question seems to be more a git problem than a Xamarin problem. Xamarin.Forms projects aren't bigger than other projects - but you have to ensure you excluded all the build output from the beginning (using a .gitignore-file for .NET projects) - otherwise you commit binaries and your nuget-feed.
Seeing this menu structure, it seems, you already are working with git (at least with a local repo without remote). So you should check your git repo settings and add github as remote: https://learn.microsoft.com/en-us/visualstudio/version-control/git-settings?view=vs-2022

When I add a solution to source control in VS 2019 Azure Devops only the startup project gets added - how do I add the others?

I am working on a solution that has 14 projects (so far) in it. I added the solution to Azure Devops source control and can see that the solution and the startup project have the little locks in the solution explorer, also I can see the startup project files in the devops repo, but I can't see how to add the other projects. Obviously I messed up somewhere, since ideally the repo would contain a folder for the startup project rather than the files themselves, but I don't know how to "undo" the source control and reset my solution back to its original state.
Can someone tell me how to either fix the source control so that the master branch contains all of the projects in sub-folders (as per the visual studio folder structure) - i.e. how to move the startup project files in the devops repo to a sub-folder and how to add the other projects to their own sub-folders, or, failing that, how to undo the source control so that all of my solution files are back on my local hard disk?
Any advice will be appreciated.
You mentioned that you are using git. So when you DO NOT have local changes which are not pushed to your git server, that means everything is "synced".
Make a backup of your folder, just copy & paste everything!
You can just delete the .git folder. So you have no "link" to the git server anymore.
You can the link the "folder" again to your git server, with sth. like:
git remote add origin https://YOURNAME.visualstudio.com/YOURPROJECT.git
Other option is check your .gitignore file, maybe some of your projects are excluded.
When you are working with Visual Studio, can can also create a new empty solution and add the projects one by one. Also be sure that there is NO Filter in Project Explorer in Visual Studio.
You can also check your git changes, with git log or git status from any terminal or command line tool.

How can I write documentation on GitLab pages from Visual Studio Code?

I'm new to Visual Studio Code. On my projects, I use GitLab project pages to document project process and code.
What is the best way to publish on GitLab pages from the same workspace?
Since I guess we're talking about the Wiki section in GitLab, each Wiki has its own Git repository and therefore should be treated as an individual project, which is, at least regarding the version control, detached from your main project.
This is actually stated in the documentation:
Wikis are based on Git repositories, so you can clone them locally and
edit them like you would do with every other Git repository. To clone
a wiki repository locally, select Clone repository from the right-hand
sidebar of any wiki page, and follow the on-screen instructions.
Files you add to your wiki locally must use one of the following
supported extensions, depending on the markup language you wish to
use. Files with unsupported extensions don’t display when pushed to
GitLab:
Markdown extensions: .mdown, .mkd, .mkdn, .md, .markdown. AsciiDoc
extensions: .adoc, .ad, .asciidoc. Other markup extensions: .textile,
.rdoc, .org, .creole, .wiki, .mediawiki, .rst.
About editing in Visual Studio Code, take a look at the documentation of the Markdown language.
When you've edited your page, simply commit and push your change.
For documentation within your main project (e.g., the readme.md file) simply modify them and also commit and push them. By the way: explanations of source code usually don't belong in the Wiki, but rather in the source code directly in the language's appropriate form (e.g., Javadoc-style comments in Java).

Move repos to other project

During the years, i wrongly used Visualstudioonline (now Azure DevOPs).
I created a project (believing that this was a repo) and then create a folder on each where i stored the various project.
Now i would like to separate these folder and create a Project for each folder.
Is there a way to migrate/move the single folder (with all its history) to new project ?
The sources are now in azure devops version control, and the new project has to be in the same version control and i don't want to create GIT repo.
From the webserver that there is import feature under the project, but the tools only convert from TFVC version to GIT and not from TFVC to TFVC.
I am in the same boat the way in which I am doing it as follows:
Create the new repo
Clone existing repo to my pc
Checkout all branches
Add new repo as a remote to my local repo
Push the repo to the new remote
Go through and clean up the repo
Yes it is painful but the way im doing it is as I'm working on the project.
The other option would be to fork the repo but I haven't found a way to server the fork link.
I am afraid there is currently no built-in function to migrate from tfvc to tfvc.
You can try using a third-party tool OpsHub Visual Studio Online Migration Utility to do this.
A contributor has successfully implemented this feature with this third-party tool.For details please refer to this case.
Hope this helps.

Hosting executable on github

I want allow users to download executable of one of my project on github, without downloading all sources or browsing the entire project.
According to this similar question, you could use a upload/download service, which apparently, github has shut down.
So is there another way? Is github aiming at sharing code only, not software?
Update 2d July 2013, you now can define a release.
Releases are accompanied by release notes and links to download the software or source code.
Following the conventions of many Git projects, releases are tied to Git tags. You can use an existing tag, or let releases create the tag when it's published.
You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release. Once published, the release details and assets are available to anyone that can view the repository.
This is what replaces the old binary upload service, which was removed in December 2012!
Ideally, you would store your executable in an artifact repository, as opposed as a source repository like GitHub.
So yes, GitHub is for source control management, not deliveries (like binaries produced from your code).
Nexus is the usual choice for any generated artifacts like binaries, with a free upload possibility for open-source projects.
See "How do I get my software into Central?" (from this answer, also mentioned in "Maven repository hosting for non-public artifacts?")
You can create another repository to host all your builds , I mean executable files . With in that repository don't add any of your code other than your builds ,
As a result of this , people can click on download Zip button at git hub , which downloads only executable ( as a zip file ).
while building you can copy the executable file in a folder just push to remote repository which is hosting only builds .
Hope this helps .
basically , GIT is just an SCM ( source code management system ) it is not meant for this purpose .
but still this how you can utilize the service of github.org amd git .
hope this helps .
EDIT : -
Git hub now has a solution for hosting releases it has been well explained by #VonC in the post below . Please use that as a solution.
The following worked for me, YMMV. On a MAC and using Chrome browser, after getting to this page I clicked on the "Raw" button (the "View Raw" link also worked), and it downloaded the executable tatuMicro.kit to my Downloads folder
An exe file can be hosted under releases and the link can be distributed among friends etc. I tested it as recently as yesterday. Only issue is if someone sabotages the program for profit. The exe files can be moved around and distributed easily on pendrives.