NuGet problem (net471 profile)

It seems that LINQPad cannot find assemblies if they are inside the net471 profile. Neither can the types be referred to from inside C# code in LINQPad, nor the "Show assemblies in this package" shows the problematic assemblies. All other assemblies are shown, that are not inside the net471 profile.

The problem is being experienced with version 5.26.01, but the problem still persists in beta version 5.28.07, so the "A bug when referencing NuGet packages with multiple native dependencies has been fixed." bugfix has not solved this problem.

In my specific case the problematic assembly is here inside LINQPad's NuGet cache:

...\AppData\Local\LINQPad\NuGet.FW46\Libraries.General\Libraries.General.1.0.6653.30832\lib\net471\Libraries.General.dll

and inside the "...\AppData\Local\LINQPad\NuGet.FW46\Libraries.General\LINQPadPackageInfo.xml" the related lines are:

<Package ID="Libraries.General" Version="1.0.6653.30832"> <AssemblyReferences> <Reference>lib\net471\Libraries.General.dll</Reference> </AssemblyReferences> <FrameworkReferences /> </Package>

Now, if I rename the net471 directory to net461 so the new path of the assembly is this:

...\AppData\Local\LINQPad\NuGet.FW46\Libraries.General\Libraries.General.1.0.6653.30832\lib\net461\Libraries.General.dll

and change the related lines of LINQPadPackageInfo.xml to this:

<Package ID="Libraries.General" Version="1.0.6653.30832"> <AssemblyReferences> <Reference>lib\net461\Libraries.General.dll</Reference> </AssemblyReferences> <FrameworkReferences /> </Package>

then everything works fine: the types can be referred to from inside C# code in LINQPad, and the "Show assemblies in this package" shows the problematic assembly.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!