NuGet and multiple solutions

前端 未结 4 633
我在风中等你
我在风中等你 2020-12-23 20:05

We have two solutions: foo.sln and bar.sln

I have a common library that is used by both foo and bar. Common.csproj is used by both.

If I open foo and update

4条回答
  •  -上瘾入骨i
    2020-12-23 20:11

    In our case, many developers and solutions with tfs, and multiple versions of it in different branches ... and each developer their understanding of where the source must lie.

    Relative path in this case not work, absolute paths in case of coincidence disc are replaced by relative and also did not work.

    Our solution consists in getting rid of the relative path. You can do it if you put NuGetPackages on a separate disk. like so:

    net use /persistent:yes p: \\localhost\C$\NuGetPackagesDiskFolder
    

    Any folder name you wont
    After that, you can specify realy absolute path in the NuGet.Config

    
    
    
    
    
    
    

    After all delete suo files

    ps: Will a little trouble with the alteration of exsisting solutions, if they live in sourcecontrol easiest way is to correcting the path to p:\NuGetPackages in each .csproj Otherwise it is necessary to reinstall all the refs and manually undo all packages.config marked as deleted in the sourcecontrol

提交回复
热议问题