discosultan / penumbra

2D lighting with soft shadows for MonoGame
MIT License
321 stars 32 forks source link

ResourceContentManager not defined in PEnumbraComponent.cs source #1

Closed InfiniteProductions closed 8 years ago

InfiniteProductions commented 8 years ago

With the last source snapshot, using MG 3.5.1 on windows 7 64b, with VS 2015 Windows Desktop Edition, Penumbra cannot be generated out of the box because the ResourceContentManager is not found in Initialize method.

discosultan commented 8 years ago

ResourceContentManager should only be available for MonoGame desktop platforms. I suspect that your game is loading a MonoGame dll of a different platform.

I have successfully tested the latest version of Penumbra (MG 3.5.1) with MonoGame WindowsDX nuget dll as well as with the dlls from the following MonoGame assemblies paths:

Might it be that targeting the latest MonoGame from GAC actually loads it from an invalid platform folder (Windows8, for example)? One thing to try is to set a hint path for MonoGame to your .csproj file and see if that changes anything:

<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL">
    <HintPath>C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
</Reference>
InfiniteProductions commented 8 years ago

In fact, I use penumbra solution right out of the box, so the project type is what you have used initially and I have no control over it (a thing I hate in VS !), I have pick a MG dll which should have been the good one and get this error, today, I pick one by hand which is from the last MG 3.5.1, and it's work !

But the project didn't include the WINDOWS symbol (whereas it should, if this is a windows project), I just add it to be sure.

Thanks for your help. Issue closed.

discosultan commented 8 years ago

Indeed, there was an issue with the MG dependency for Platformer2D sample. This caused solution build to fail. This has been fixed.

Thanks for the report! :+1:

InfiniteProductions commented 8 years ago

You're welcome.

Just a bit off-topic, why there is so much extra dependencies on the sandbox project ? Would it be no other way to show what penumbra can do without all of these ? IMHO, I think a demo without any extra dependencies will be more helpful (something like x samples, SPACE to switch to the next, showing one feature at a time, with some simple control like arrow keys to move a light)

discosultan commented 8 years ago

HelloPenumbra and Platformer2D were actually meant to be the two samples to demonstrate the library. Sandbox has been more like an experimentation mash-everything-together project for me to test different scenarios. Initially, I planned to remove it from this repository, but never got to it.

It's probably a good idea to remove it or replace it with something simpler - it can definitely be a source of confusion.