@@ -7,12 +7,16 @@ NuGet Package Manager GUI, or the NuGet Package Manager Console:
77Install-Package Nerdbank-GitVersioning
88```
99
10+ If in a project that uses PackageReference for this package reference, you should manually add
11+ ` PrivateAssets="true" ` to the PackageReference xml element to workaround
12+ [ this issue] ( https://github.com/AArnott/Nerdbank.GitVersioning/issues/122 ) .
13+
1014After installing this NuGet package, you may need to configure the version generation logic
1115in order for it to work properly.
1216
13- With NuGet 2.x , the configuration is handled automatically via the tools\Install.ps1 script.
14- For NuGet 3.x , you can run the script tools\Create-VersionFile.ps1 to help you create the
15- version.json file and remove the old assembly attributes.
17+ When using packagse.config , the configuration is handled automatically via the tools\Install.ps1 script.
18+ When using project.json or PackageReference , you can run the script tools\Create-VersionFile.ps1 to help
19+ you create the version.json file and remove the old assembly attributes.
1620
1721The scripts will look for the presence of a version.json or version.txt file.
1822If one already exists, nothing happens. If the version file does not exist,
@@ -35,14 +39,19 @@ source code, as commonly found in your `Properties\AssemblyInfo.cs` file:
3539[assembly : AssemblyInformationalVersion (" 1.0.0-dev" )]
3640```
3741
42+ If you are using the new VS 2017 .NET Core/Standard projects (or otherwise using the .NET SDK project type)
43+ you won't see these attributes in your AssemblyInfo.cs file but you may still get compiler errors
44+ due to duplicate attributes. In that case, a Rebuild of your project should resolve
45+ [ the issue] ( https://github.com/AArnott/Nerdbank.GitVersioning/issues/121 ) .
46+
3847This NuGet package creates these attributes at build time based on version information
3948found in your ` version.json ` file and your git repo's HEAD position.
4049
4150When the package is installed, a version.json file is created in your project directory
42- (for NuGet 2.x clients). This ensures backwards compatibility where the installation of
51+ (for packages.config clients). This ensures backwards compatibility where the installation of
4352this package will not cause the assembly version of the project to change. If you would
4453like the same version number to be applied to all projects in the repo, then you may move
45- the file to the root directory of your git repo.
54+ the version.json file to the root directory of your git repo.
4655
4756Note: After first installing the package, you need to commit the version file so that
4857it will be picked up during the build's version generation. If you build prior to committing,
0 commit comments