I have following project structure with 3 Nuget dependencies:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;net46</TargetFrameworks>
...
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="Selenium.WebDriver" Version="3.7.0" />
<PackageReference Include="SpecFlow.CustomPlugin" Version="2.2.1" />
</ItemGroup>
</Project>
It's really cool that VS2017 allows creating NuGet packages out of the box.
But what can do if I want to include custom NuGet references and don't wanna include references I use now?
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
...
<dependencies>
<dependency id="SpecFlow" version="2.2.0" />
<dependency id="NUnit" version="3.0.0" />
<dependency id="Autofac" version="[3.3.0,3.5.2]" />
<dependency id="Autofac.Configuration" version="[3.3.0]" />
<dependency id="Selenium.WebDriver" version="3.0.0" />
</dependencies>
</metadata>
</package>
I this case I need to have Autofac with my lib but I don't need it to build my lib. Or I don't need SpecFlow.CustomPlugin with all dependencies in project which will use my lib but it needs have one to build itself.
I think there is a way to include NuSpec file path to new csproj but I think all csproj PropertyGroup fields won't be used.
Any suggestions? Thanks