Wyamio / Wyam

A modular static content and static site generator.
MIT License
141 stars 29 forks source link

Could not reference Wyam.Common namespace with nuget #1

Open kiyo4act opened 4 years ago

kiyo4act commented 4 years ago

I started to create a new shortcode dll with Wyam.Common package following steps but my project could not solved reference under Wyam.Common namespaces. (e.g. create a new shortcode class implement IShortcode interface.)

  1. Create a new class library project in Visual Studio 2019 (TargetFramework is netstandard2.0)
  2. Open nuget package manager and install latest Wyam.Common
  3. Add "using Wyam.Common.xxx" but could not be found.

It works fine that Download Wyam.Common.nupkg and rename ext to zip, then I extract dll file and add the reference directly.

daveaglick commented 4 years ago

Wyam.Common also targets netstandard2.0 so as far as I know it should work. This is the first report I've seen of a package install succeeding but the namespaces being unavailable. Do you see it in the list of NuGet references (and does it have a little yellow caution symbol)? What about if you try to reference a type in Wyam.Common using a fully-qualified name instead of by bringing the namespace in scope? Does that build, and if not what build error do you get?

daveaglick commented 4 years ago

FYI - the original Wyam project is being moved to statiqdev to continue work there as Statiq Web (the successor to Wyam and the Wyam blog recipe). Since this issue relates specifically to Wyam, I've moved it to a new replacement project for legacy Wyam issues.

kiyo4act commented 4 years ago

Thanks for your kindly reply and information.

My situation is summarized in this VS screenshot. Capture

Please consider to include in the test automation when your project will face the same issue.