Lombiq / Orchard-Training-Demo-Module

Demo Orchard Core CMS and Orchard 1.x module for for you to become an Orchard developer. This module completes the training materials under https://orcharddojo.net.
https://orcharddojo.net
BSD 3-Clause "New" or "Revised" License
160 stars 58 forks source link

TemplateContext.GlobalMemberAccessStrategy is undefined #59

Closed hyzx86 closed 3 years ago

hyzx86 commented 3 years ago

Is this code out of date?

https://github.com/Lombiq/Orchard-Training-Demo-Module/blob/0004b296103f12e520f95d466b0ae7b513cf64d9/Startup.cs#L63

image

Piedone commented 3 years ago

It might be with a newer version of Orchard we don't support yet. Are you using the module like this? https://github.com/Lombiq/Orchard-Training-Demo-Module#how-to-start

hyzx86 commented 3 years ago

Yes, I did that by referring to the documentation. And it's not just this one problem.

This is a new try(another computer) , I tried this library last year and it still worked. But when I recently updated the code and tried again, I found that it doesn't work

Piedone commented 3 years ago

I really don't know what the issue could be. I just tried and it works for me, as it is working in our CI.

Please show the full Error List. Also, are you using the latest VS? Are NuGet restores working for you?

hyzx86 commented 3 years ago

Visual Studio 2019 Version 16.9.4

I added this project to the OrchardCore source code project directory.

under the Path OrchardCore\src\OrchardCore.Modules\Orchard-Training-Demo-Module

image

The package reference looks okay: image

image

Piedone commented 3 years ago

Using the full Orchard source is not a supported scenario anymore. Please use the Open-Source Orchard Core Extensions repository as explained under https://github.com/Lombiq/Orchard-Training-Demo-Module#how-to-start