visual studio - Should nuget .props and .targets files be part of the source code repository? -


those files created during package restore that's why assume don't have in repository. there further documentation of purpose of files might answer question?

for .net core project nuget.g.targets , nuget.g.props generated nuget restore. created in obj folder. not need have these in version control. typically files in obj folder not included in version control.

visual studio automatically restore these files on opening solution if missing.

if using build server can run dotnet restore restore these files. msbuild 15 when installed visual studio 2017 can used restore these files running msbuild /t:restore solution.

the nuget.g.targets , nuget.g.props files define various properties, such path packages cache on machine. include msbuild imports nuget packages referenced project need.

for example, if have microsoft.net.test.sdk nuget package referenced, nuget.g.targets , nuget.g.props import msbuild files included in nuget package. when using packages.config file these imports added directly project file (.csproj).


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -