grumpydev/TinyIoC

Resolve Issues with 1.4 alpha nuget packages

niemyjski opened this issue · 10 comments

References: #135

  • Listing dependencies in it (NetStandard 1.2-2.0, pcl 4.6, net45)? Is this fine?
  • Source Includes don't seem to be running even though file content is specified. I'm not sure if this is just an issue with the new csproj file format.
  • ASP.NET Package says it targets NetStandard 2.0 as well. Figure out if we can just skip this project during build.

If anyone could help out with this issue it would be greatly appreciated.

Added TinyIoC 1.4.0 alpha 1 to a .net standard 2.0 library project. It installed but was not "detected". Tried to downgrade to standard 1.6 but did not help

Same experience as @Tviljan. Added to Xamarin .NET Standard 2.0 project and it installed, but has nothing available in Object browser or via typing.

Yeah, there is an issue with source imbedding that we need to figure out or revert to old way of source imbedding (not ideal). Any help would be appreciated.

I did a little reading on the subject. One option is well described here: https://medium.com/@attilah/source-code-only-nuget-packages-8f34a8fb4738

Nugetizer may provide some syntactic sugar: https://gist.github.com/attilah/fd3e71f03fd258c496179e0200c57b0b#gistcomment-3686577

I don’t actually know what this stuff looks like on the consumption side - I’m reading on a tablet and won’t be in a position to tinker in Visual Studio for a while. I don’t know if the source code would be added to the project directly, or if it’s instead hidden in the package as an immutable file shared by all solutions on the machine.

Depending on your goals it could be interesting.

The way to include content files has changed with PackageReference. The target folder is not content anymore but follows a pattern described in the .nuspec reference. They recommend for compatibility to have both directories specified.

Adding the package path to the content file and changing the type from Content to Compile made the nuget working for me with PackageReference:

  <ItemGroup Condition="'$(Configuration)'=='Source'">
    <Compile Include="TinyMessenger.cs">
      <Pack>true</Pack>
      <PackageCopyToOutput>true</PackageCopyToOutput>
      <PackagePath>contentFiles/cs/any</PackagePath>
    </Compile>
  </ItemGroup>

Hope this helps!

@gillima is there any chance you could submit a quick pr for the 3 projects and try it out? I'm curious if that is the only change we need to make or do we need to make some changes to the common.props in the build folder as well (Brought in via directory.build.props)

@grumpydev Can you please update the NUGET_KEY so we can push tagged packages to nuget: https://github.com/grumpydev/TinyIoC/actions/runs/885366293

@grumpydev Can you please update the NUGET_KEY so we can push tagged packages to nuget: https://github.com/grumpydev/TinyIoC/actions/runs/885366293

Done.. I think :)

Thanks!