Source control Visual Studio Community 2019

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Source control Visual Studio Community 2019

Post by Henk »

My solution contains two projects. One is a library.
But now I'm unable to put second project under source control.
Putting first project in solution under source control giving no problem.
I don't know how to add that second project under source control.
Maybe this community version does not support that.

Making changes without source comtrol being too risky.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Source control Visual Studio Community 2019

Post by Sven »

Which version control are you using there, Git or TFVC? In case of Git, are you sure you want to put the second project (I guess it is for the executable that uses the library) into a separate Git repository? If you really want to then you could make the library project a sub-project of the top-level (executable) project using Git submodules. Not sure whether VS supports that directly but you could always create submodules using plain Git commands.

https://git-scm.com/docs/git-submodule

Code: Select all

% cd toplevel
% mkdir library
% cd library
% git init # creates "library" as a repository
% ... (initial commit) ...
% cd ..
% git submodule add library # makes "library" a submodule of "toplevel"
% git commit -m "update submodule reference" library # store submodule reference to the current Git hash of "library"
It should be checked, though, whether VS will detect submodules later on.

Personally I use Git via command line and/or graphical UI (e.g. "gitk") but I do not use any version control function of VS simply because I do not trust it ...
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Source control Visual Studio Community 2019

Post by Henk »

Yes using git. I don't know anything about git.
Only pushing some buttons in visual studio 2019 community.
Encountering this problem.

Guess that adding a unit test project won't be added to git as well.

Maybe first have to read some parts of git tutorial otherwise I don't have a clue what I'm doing.

Already created some dummy solutions trying to figure out what was going on. As usual a mess.

No code no clue. I only have some knowledge of C#. That's it.


Usually getting a panic attack when using package manager.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Source control Visual Studio Community 2019

Post by Henk »

By the way Visual studio 2019 community edition takes 1.2 gigabyte internal memory on my computer.

Isn't that a bit too much?
Includes a ServiceHub? of 0.4 gigabyte.

I think I had better installed 2017 edition on my new computer which is hardly faster than my old computer.
But I had to buy a new one because of these blue screen errors. Only start up is fast but after that it is slower than my old computer.
Mouse refuses to copy lines each time. Have to try at least two or three times. This is most annoying.

Also had to kill an audio process which consumes 36% processing time. Looks like it is standard and started automatically.
It is called audio device graph isolation or something like that.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Source control Visual Studio Community 2019

Post by jdart »

I only use the Visual Studio IDE for debugging. Otherwise I'm using the command line. Learning the git command line commands is pretty essential IMO. Git is a very powerful tool but you need to know what you doing and MSVC will not expose the full functionality.

--Jon
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Source control Visual Studio Community 2019

Post by Henk »

Looks like there is only a problem when projects not in same map or parent map.
Unfortunately i also have created a solution with two projects in totally different maps.


Don't know what misery I get if I move project to same parent map.
Last edited by Henk on Tue Sep 03, 2019 12:52 pm, edited 2 times in total.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Source control Visual Studio Community 2019

Post by Sven »

Henk wrote: Tue Sep 03, 2019 12:24 pm Looks like there was no problem at all with this visual studio version and source control.
I added a second project but did no commit.
So when I changed a file it did not show it had been changed so I mistakenly assumed there was no source control on that project.
The common problem of GUIs that were partially made on top of an existing command line tool: You were not made aware of having missed the initial commit, you were even allowed to reach that state without noticing. Using the original command line, roughly one of three Git commands you type is "git status" and that would tell you that there are "99 untracked files" and nothing that you already put under version control, so it is almost impossible to miss that. Certainly many "grey" states are possible when working on the raw command line but you are able to have everything under your control. And even a native Git GUI like "gitk" would show you what is going on in your current workspace.

In general MS Visual Studio has always been a good graphical environment, there is a lot in it that I like. But "wrapping" around existing other tools while still providing functionality, usability and consistency seems to be a hard task.
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Source control Visual Studio Community 2019

Post by Henk »

I edited my last post. So still not fixed. For I have another solution using same library but totally different maps.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Source control Visual Studio Community 2019

Post by Henk »

Ok copied projects maps to the same parent map. This is a workaround. Looks like it's fixed.
Also included project into solution (of course).
User avatar
Look
Posts: 364
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: Source control Visual Studio Community 2019

Post by Look »

I just copy my source at various times. Hopefully I should not get back to previous copies.
Farewell.