-
Notifications
You must be signed in to change notification settings - Fork 265
Closed
Labels
Functionality:PackPriority:2Issues for the current backlog.Issues for the current backlog.Resolution:DuplicateThis issue appears to be a Duplicate of another issueThis issue appears to be a Duplicate of another issueType:Feature
Milestone
Description
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): dotnet.exe
dotnet.exe --version (if appropriate): 2.0.0-preview2-006497 / 1.0.4
OS version (i.e. win10 v1607 (14393.321)): win10 enterprise
Worked before? If so, with which NuGet version: works with .nuspec files
Detailed repro steps so we can see the same problem
Right now we have .nuspec files that reference a package built from the same solution. We set the version to be an exact version.
Example:
Solution.sln
| - Project.Web.csproj
\ - Project.Core.csproj
Old Project.Web.nuspec:
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Project.Web</id>
<version>$version$</version>
<dependencies>
<dependency id="Project.Core" version="[$version$]" />
</dependencies>
</metadata>
</package>
Is there a way to specify this in csproj with a project included via ProjectReference?
E.g. using Project.Web.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<DebugType>full</DebugType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Project.Core\Project.Core.csproj" />
</ItemGroup>
</Project>
when we dotnet pack Solution.sln /p:Version=1.2.3, we want the generated Project.Web.nuspec (inside Project.Web.nupkg) to have:
<version>1.2.3</version>
<dependencies>
<dependency id="Project.Core" version="[1.2.3]" />
</dependencies>
but currently it has:
<version>1.2.3</version>
<dependencies>
<dependency id="Project.Core" version="1.2.3" />
</dependencies>
psmolinsky, hotchkj, madelson, Lizzy-Gallagher, amybingzhao and 18 more
Metadata
Metadata
Assignees
Labels
Functionality:PackPriority:2Issues for the current backlog.Issues for the current backlog.Resolution:DuplicateThis issue appears to be a Duplicate of another issueThis issue appears to be a Duplicate of another issueType:Feature