AssemblyVersion
Where other assemblies that reference your assembly will look. If this number changes, other assemblies have to update their references to your assembly! Only update this version, if it breaks backward compatibility. The AssemblyVersion
is required.
I use the format: major.minor. This would result in:
[assembly: AssemblyVersion("1.0")]
If you're following SemVer strictly then this means you only update when the major changes, so 1.0, 2.0, 3.0, etc.
AssemblyFileVersion
Used for deployment. You can increase this number for every deployment. It is used by setup programs. Use it to mark assemblies that have the same AssemblyVersion
, but are generated from different builds.
In Windows, it can be viewed in the file properties.
The AssemblyFileVersion is optional. If not given, the AssemblyVersion is used.
I use the format: major.minor.patch.build, where I follow SemVer for the first three parts and use the buildnumber of the buildserver for the last part (0 for local build).
This would result in:
[assembly: AssemblyFileVersion("1.3.2.254")]
Be aware that System.Version names these parts as major.minor.build.revision
!
AssemblyInformationalVersion
The Product version of the assembly. This is the version you would use when talking to customers or for display on your website. This version can be a string, like '1.0 Release Candidate'.
The AssemblyInformationalVersion
is optional. If not given, the AssemblyFileVersion is used.
I use the format: major.minor[.patch] [revision as string]. This would result in:
[assembly: AssemblyInformationalVersion("1.0 RC1")]
shutil
has many methods you can use. One of which is:
from shutil import copyfile
copyfile(src, dst)
# 2nd option
copy(src, dst) # dst can be a folder; use copy2() to preserve timestamp
- Copy the contents of the file named
src
to a file named dst
. Both src
and dst
need to be the entire filename of the files, including path.
- The destination location must be writable; otherwise, an
IOError
exception will be raised.
- If
dst
already exists, it will be replaced.
- Special files such as character or block devices and pipes cannot be copied with this function.
- With
copy
, src
and dst
are path names given as str
s.
Another shutil
method to look at is shutil.copy2()
. It's similar but preserves more metadata (e.g. time stamps).
If you use os.path
operations, use copy
rather than copyfile
. copyfile
will only accept strings.
Best Answer
I didn't find how to do that in the boost library. But you can do it using Windows API:
See SetFileAttributes Function and GetFileAttributes Function for more info.