NETSTANDARD 1.6 & NET47 cross compile support

edited July 2017
I have a package built against both NETSTANDARD & NET47. Here is my csproj;

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
	<AssemblyTitle>My.Common</AssemblyTitle>
	<TargetFrameworks>netstandard1.6;net47</TargetFrameworks>
	<AssemblyName>My.Common</AssemblyName>
	<PackageId>My.Common</PackageId>
	<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
	<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
	<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
	<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
	<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
	<Version>1.0.201-beta</Version>
	<Authors>Gareth Brown</Authors>
	<PackageTags>BLAH BLAH BLAH</PackageTags>
	<Description>BLAH BLAH BLAH</Description>
  </PropertyGroup>

  <ItemGroup>
	<PackageReference Include="ImageSharp" Version="1.0.0-alpha5-00046" />
	<PackageReference Include="Quartz" Version="3.0.0-alpha2" />
	<PackageReference Include="System.ComponentModel" Version="4.3.0" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net47' ">
	<Reference Include="System" />
	<Reference Include="Microsoft.CSharp" />
  </ItemGroup>
  
  <!-- Project files here -->
</Project>
When adding the package in LINQPad I get the following error;

image


This is strange because I'm using this package in many places, but cannot within LINQPad. Does LINQPad support framework 4.7 or netstandard 1.6?

Using LINQPad 5.22.02, and tried Beta 5.22.09 but got the same problem.

The LINQPad log has some errors in it;

5.22.09(AnyCPU) 2017-07-05T13:05:36.5515878+01:00 CheckForNuGetUpdates -
InvalidOperationException: The property 'NormalizedVersion' does not exist on type 'LINQPad.Interop.NuGet.VersionedPackageID'. Make sure to only use property names that are defined by the type.
at System.Data.Services.Client.Materialization.FeedAndEntryMaterializerAdapter.TryRead()
at System.Data.Services.Client.Materialization.FeedAndEntryMaterializerAdapter.TryStartReadFeedOrEntry()
at System.Data.Services.Client.Materialization.FeedAndEntryMaterializerAdapter.TryReadEntry(MaterializerEntry& entry)
at System.Data.Services.Client.Materialization.FeedAndEntryMaterializerAdapter.d__0.MoveNext()
at System.Data.Services.Client.Materialization.FeedAndEntryMaterializerAdapter.Read()
at System.Data.Services.Client.Materialization.ODataEntityMaterializer.ReadImplementation()
at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
at System.Data.Services.Client.MaterializeAtom.MoveNext()
at System.Linq.Enumerable.d__94`1.MoveNext()
at LINQPad.Interop.NuGet.NuGetAgent.PopulateLatestPackageVersions(Uri source, String[] packageIDs, Boolean allowPrerelease, Dictionary`2 results)
at LINQPad.Interop.NuGet.NuGetAgent.GetLatestVersionsOfLocalPackages(NuGetRepositoryRoot[] localPackages)
at LINQPad.UI.NugetManager.StartCheckForUpdates()
INNER: ODataExceptionThe property 'NormalizedVersion' does not exist on type 'LINQPad.Interop.NuGet.VersionedPackageID'. Make sure to only use property names that are defined by the type. at Microsoft.Data.OData.ReaderValidationUtils.ValidateValuePropertyDefined(String propertyName, IEdmStructuredType owningStructuredType, ODataMessageReaderSettings messageReaderSettings, Boolean& ignoreProperty)
at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueDeserializer.ReadPropertiesImplementation(IEdmStructuredType structuredType, ReadOnlyEnumerable`1 properties, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, Boolean epmPresent)
at Microsoft.Data.OData.Atom.ODataAtomEntryAndFeedDeserializer.ReadEntryContent(IODataAtomReaderEntryState entryState)
at Microsoft.Data.OData.Atom.ODataAtomReader.ReadEntryStart()
at Microsoft.Data.OData.Atom.ODataAtomReader.ReadAtFeedStartImplementation()
at Microsoft.Data.OData.ODataReaderCore.ReadImplementation()
at Microsoft.Data.OData.ODataReaderCore.InterceptException[T](Func`1 action)
at System.Data.Services.Client.Materialization.ODataReaderWrapper.Read()
at System.Data.Services.Client.Materialization.FeedAndEntryMaterializerAdapter.TryRead()
First chance data: LINQPad.Interop.NuGet.NuGetAgent.PopulateLatestPackageVersions(source,packageIDs,allowPrerelease,results) offset=0x139
-LINQPad.Interop.NuGet.NuGetAgent.GetLatestVersionsOfLocalPackages(localPackages) offset=0x87
-LINQPad.UI.NugetManager.StartCheckForUpdates() offset=0x4C

I'm retrieving the package from a Visual Studio Online private NuGet feed.

Comments

  • I'm guessing the problem is not with the output assemblies, but with the NuGet package itself. In order for LINQPad to consume assemblies in a NuGet package, they must be packaged as reference assemblies (in the lib folder). Some NuGet packages do not have any reference assemblies, and use other tricks with scripts and msbuild to add references to the project. LINQPad does not use projects or msbuild, so it needs simple reference assemblies.
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!