Beto Beto - 2 months ago 9
ASP.NET (C#) Question

Sharing .netcore project between windows and linux Keeps adding files

I am working on a group project and we have decided to use netcore for the project. The project was originally created using VS.

When I pull the project and run it using VSCode, I have noticed two things:


  1. I have to navigate to the src folder and run it from there.

  2. Before pushing new changes to the master branch, .netcore on linux has made changes to obj folder and added .vscode folder.



how can I stop this from happening so we don't step over each others toes, and why does this happen?

Thanks.

Answer

You should not add the files under obj to source control. It contains artifacts that are regenerated on every build.

If you use git, here's a suggested list of files and folders to ignore:

[Oo]bj/
[Bb]in/
.vs/
*.xap
*.user
/TestResults
*.vspscc
*.vssscc
*.suo
*.cache
*.docstates
_ReSharper.*
*.csproj.user
*[Rr]e[Ss]harper.user
_ReSharper.*/
packages/*
artifacts/*
msbuild.log
PublishProfiles/
*.psess
*.vsp
*.pidb
*.userprefs
*DS_Store
*.ncrunchsolution
*.log
*.vspx
/.symbols
nuget.exe
build/
*net45.csproj
*k10.csproj
App_Data/
bower_components
node_modules
*.sln.ide
*.ng.ts
*.sln.ide
project.lock.json
.build/
.testpublish/
launchSettings.json