Page 1 of 1

Source control Visual Studio Community 2019

Posted: Wed Aug 28, 2019 7:39 am
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.

Re: Source control Visual Studio Community 2019

Posted: Wed Aug 28, 2019 9:32 pm
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 ...

Re: Source control Visual Studio Community 2019

Posted: Thu Aug 29, 2019 10:11 am
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.

Re: Source control Visual Studio Community 2019

Posted: Fri Aug 30, 2019 2:58 pm
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.

Re: Source control Visual Studio Community 2019

Posted: Sat Aug 31, 2019 2:21 pm
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

Re: Source control Visual Studio Community 2019

Posted: Tue Sep 03, 2019 10:24 am
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.

Re: Source control Visual Studio Community 2019

Posted: Tue Sep 03, 2019 10:48 am
by Sven
Henk wrote:
Tue Sep 03, 2019 10:24 am
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.

Re: Source control Visual Studio Community 2019

Posted: Tue Sep 03, 2019 10:54 am
by Henk
I edited my last post. So still not fixed. For I have another solution using same library but totally different maps.

Re: Source control Visual Studio Community 2019

Posted: Tue Sep 03, 2019 11:33 am
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).

Re: Source control Visual Studio Community 2019

Posted: Tue Sep 03, 2019 3:35 pm
by Look
I just copy my source at various times. Hopefully I should not get back to previous copies.