Teamcity "Failed to find Visual Studio .sln file" error - github

I wrote the right path to github project in teamcity:
But i am getting the folowing error:
Teamcity don't fetch the content from the github path.
Do i need to do something else?

If you add the VCS root to your version control settings in the build configuration, it will extract the source code onto disk.
TeamCity documentation - Configuring VCS Settings
Hope this helps

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

FailedRequest: Service Unavailable(503) for TFS on Visual Studio Code

I'm trying to integrate VSCode with TFS using this Stackoverflow answer.
I have installed the Azure Repos extension and in my settings.json folder, I have done the following:
{
"tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\TF.exe",
"tfvc.restrictWorkspace": true
}
While trying to do the team signin portion through the command palette however, I'm prompted with this message:
Provide the username for server (servername:8080)
I enter this and my password, but the connection fails. On the bottom of my VSCode window, I can see this error message when I hover my mouse over the "Team" text:
Failed Request: Service Unavailable(503) - http://servername:8080/tfs/companyprojectcollection/_apis/tfvc/branches
I'm a bit confused. On Visual Studio 2019, to add a server I just had to add the url as http://servername:8080/tfs and login with my credentials, after which I was able to view the workspace/folder that was created for me.
Do I need to edit the initial server it requests me to log into as "http://servername:8080/tfs" instead of "servername:8080", and if so, how?
Why does the error say service unavailable with added folders like companyprojectcollection/_apis/tfvc/branches? How do I fix this?
I could use Visual Stuio 2019, but VSCode is my preferred editor.
EDIT: The error while hovering over the Team button. This is the same format in which I saw the 503 error earlier, except that said "Service Unavailable(503)"
Failed Request: Service Unavailable(503) - http://servername:8080/tfs/companyprojectcollection/_apis/tfvc/branches
From the error message, it seems that the linked URL has some issue. Generally, the URL to connect to the tfvc repo is like this:
http://servername:8080/tfs/DefaultCollection/tfvcrepo
Here are the steps to link the TFVC repo in VS code:
Step1: Create a workspace and map the workspace to local machine in Visual Studio 2019.
Then the Tfvc Repo will be checked out in the path.
Step2: Open either the root folder or a sub-folder of the TFVC repository (workspace path in step1) in VS code.
Step3: Run the team signin command and input the Username and Password. Then the VS code could connect with the TFVC repo.
In this process, there is no process of customizing the URL, it will automatically recognize the tfvc repo related to the workspace.
Note: the settings.json file is still required for TFVC repo. Your settings are correct.
For mode detailed information, you could refer to this Guidance document.

How do I use .gitignore in visual studio code?

So I know this might sound like a noob question but I'm rather inexperienced with GitHub. I want to add a gitignore file to my repository, but I am unable to do so and I don't know how. I want to make sure a file is gitignored My visual studio code is connected with my repository. So I am able to push and pull via visual code.
Greetings,
Parsa & Liyam
You may go to File > New File at the root of your git repository (same directory as where your .git hidden folder is in). Then add all the directories/file that you want to be ignored into that new file and save it as .gitignore. (You can save as a plaintext file and just name it .gitignore within VS Code.
Vscode 1.46 is adding some automated help in generating a .gitignore file when you publish to github. From v1.46 release notes:
Publish to Github: Generate .gitignore
It's now possible to generate a .gitignore file when publishing a
workspace to GitHub. When publishing a workspace to GitHub, you are
prompted to select which files to include in the repository.
You can press Ctrl+Shift+P on your Visual Studio Code and then search for gitignore. Click the add gitignore option then you are good to go.

PhpStorm Settings Repository Commit on repo without HEAD not supported

I'm trying to setup a Settings Repository on GitHub.
After creating a new GitHub account and a new repository if I enter the repository upstream URL in the Settings Repository dialog of PhpStorm I receive this error message:
Failed to Sync Settings: Commit on repo without HEAD currently not supported
How I can solve this?
This seems to be a bug in the Settings repository plugin of different JetBrains IDEs. A functioning workaround is to delete the local Git repository in the IDE's config directory:
${HOME}/.<IDE>/config/settingsRepository/repository
Please refer to this site for the exact directory name of your IDE on your operating system:
https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs
The workaround was posted in the JetBrains bug report (for IntelliJ IDEA):
https://youtrack.jetbrains.com/issue/IDEA-152002#comment=27-2918113
Go into "%appdata%\JetBrains\PhpStorm2020.2\settingsRepository" (change the path to match your version of PHPStorm and then rename the folder named "repository" to something else, then you can setup the project correctly. :)

Source navigation is not showing when working with external/ remote git repository in visual studio online

Consider I have a git repository hosted in Bitbucket. I have added this reference using following way.
Serttings > Services > External Git
Now when I am going to create a build it is not showing source navigation. But when we use visual studio git it shows source navigation like following
But navigation is missing for external git
Is it known issue or I am missing any configuration that’s why it is not showing source navigation?
That is by design, you just can specify the file manually (relative path and Wildcards can be used, e.g. ConsoleApplication1/ConsoleApplication1.sln).
I submitted a user voice here that you could vote.