我试过在SO上搜索这个答案,但没有一个解决方案对我有用。我想在我的解决方案中包含xUnit.runner包以用于构建目的,但我似乎无法弄清楚如何配置.gitignore文件。到目前为止我试过这个:
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# Include the xUnit Test Runner for VSO test runs
!**/packages/xunit.runner.visualstudio.2.0.1/**
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
我甚至尝试了不同的迭代而没有运气:
!**/packages/xunit.runner.visualstudio.2.0.1/*
!**/packages/xunit.runner.visualstudio.2.0.1/
!**/packages/xunit.runner.visualstudio.2.0.1
这些都不起作用吗?我是否错误地订购了这些陈述?
答案 0 :(得分:0)
假设您的packages文件夹位于Git根文件夹中 将其添加到您的Git忽略文件
中!包/ xunit.runner.visualstudio.2.0.1