Preparing Source Code for Exit

A little new question here.

Is there an easy way to prepare source code for exit in VC # 2010 Express? In other words, delete any files that should not be released, such as key files, user preferences, etc.

If not, can someone point me to a checklist or something like that?

+4
source share
3 answers

I do not know about the built-in method (although I never looked for it); what to include will undoubtedly vary from project to project, and it would be difficult to get an automatic automatic solution. Here is a general list (from the top of my head) of what to include and exclude:

What to include

I found a good rule: "include everything that is under source control (except for version control metadata)." Mostly:

  • All source code (C # files)
  • Solution file (.sln) and all project files (* .csproj)
  • Any libraries that your code depends on build and / or launch (DLL)
  • Any other files that your project expects to be present in build mode or runtime (e.g. app.config)
  • Documentation (everything you already have, plus some kind of README indicating how to create / run a project)
  • Satellite source files (for example, installer scripts, user tools, etc.).

What not to include

  • Binary assemblies of your project (i.e. bin \ Debug, bin \ Release and obj folders) - binary files must be released separately
  • Version control metadata (.svn folders, .hg folder, etc.)
  • Settings and data for each user (for example, ReSharper folders, * .suo, * .user files)
  • Intellisense Files (* .ncb)

Key files are an interesting case - if you use it to create highly named assemblies, you may or may not want to publish this key file to the public. On the one hand, it makes it easier for someone to make changes to your code and sign the final assembly, but on the other hand, someone can make malicious changes to your code and then sign the assembly. See this question for a more complete discussion of whether key files should be released or not.

This should cover most of the files in your project directory - let me know if I missed something!

+5
source

This is what I usually do.

Delete all of the following directories:

  • Ben
  • Obj

Delete the following files (recursively):

  • *. Suo
  • *. Gpstate
  • *. Vssscc
  • *. Csproj.user

This should give you a pretty clean project that will be encrypted.

+3
source

A good rule is the list of rules for the .gitignore file. See this answer for a good starting point.

+1
source

Source: https://habr.com/ru/post/1338372/


All Articles