1

According to the NuProj documentation,

NuGet supports adding references to framework assemblies as well. You can specify those via the FrameworkReference item:

<ItemGroup>
 <FrameworkReference Include="System.dll" />
 <FrameworkReference Include="System.Core.dll" />
</ItemGroup>

But when I try this (see below), I am getting what looks like an ArgumentNullException — the generated .nuspec file does contain the correct <frameworkAssembly> elements, however:

1>C:\…\MSBuild\NuProj\NuProj.targets(527,5): error : Value cannot be null.
1>C:\…\MSBuild\NuProj\NuProj.targets(527,5): error : Parameter name: folderName

This is part of my .vbproj file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  …
  <PropertyGroup>
    <NuProjPath Condition=" '$(NuProjPath)' == '' ">$(MSBuildExtensionsPath)\NuProj\</NuProjPath>
  </PropertyGroup>
  <Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props')" />
  <PropertyGroup Label="Configuration">
    <Id>SomeProject</Id>
    <Version>…</Version>
    <Title>…</Title>
    …
  </PropertyGroup>
  <ItemGroup>
    <ProjectReference Include="..\SomeProject.vbproj" />
  </ItemGroup>
  <!-- the next ItemGroup is the one I added manually, as shown in the documentation: -->
  <ItemGroup>
    <FrameworkReference Include="System.ServiceModel.dll" />
  </ItemGroup>
  <Import Project="$(NuProjPath)\NuProj.targets" />
</Project>

Am I doing something wrong, or is this a bug with NuProj?

Community
  • 1
  • 1
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
  • I've been experiencing this issue too when building via `nuget.exe pack` on the command line, on a .nuspec file that contains `frameworkAssemblies`. The only other reference I've found to this problem is: https://github.com/NuGet/Home/issues/2648 – s3raph86 Mar 13 '17 at 06:09

1 Answers1

2

This is an issue with v3.4.3 of Nuget.exe - details here: https://github.com/NuGet/Home/issues/2648

I was able to resolve this by updating to v3.5.0 - just run > nuget update -self on the command line.

s3raph86
  • 556
  • 4
  • 17