Code Monkey home page Code Monkey logo

Comments (9)

DavidVujic avatar DavidVujic commented on September 7, 2024

Thank you for letting me know about it!

Is it the NuGet package, or the source code here on Github?

/David

27 apr. 2016 kl. 06:45 skrev Māris Krivtežs [email protected]:

I installed the latest version and got this exception:

It seems that two versions of StructureMap is installed - 3.x and 4. I tried to remove StructureMap 4, but FakeMaker depends on it.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

from episerver-fakemaker.

marisks avatar marisks commented on September 7, 2024

It is the NuGet package version 1.1.1.

from episerver-fakemaker.

DavidVujic avatar DavidVujic commented on September 7, 2024

That sounds bad. I am trying to reproduce, but fail in doing so. Probably because my test projects are too simple.

I created a new epi site using the Alloy templates. Added a new project to the solution (class library) and added NUnit and FakeMaker to the references. What happened was that there was a mismatch between dependencies for system.web.mvc and episerver. So, in the class library (the unit test project) I updated system.web.mvc and episerver.core to the same versions as the alloy web project. After that the solution can be built.

Then I created a unit test for the DefaultPageController using FakeMaker (created a fake page, added it to the fakemaker repo, passed the fakepage to the index method of the controller under test).

I would very much appreciate if you would share more info about the error, so I can fix it! Errors in the NuGet package is something to avoid :) Can you share what Epi version you use, your visual studio solution (project setup etc.), how you have added FakeMaker ...?

from episerver-fakemaker.

marisks avatar marisks commented on September 7, 2024

I have a library project:
https://github.com/marisks/SingletonPage
(now I just copied FakeMaker files into the test project)

When I installed FakeMaker latest version (and removed manually added files), build succeeded but had this error when running the test.

As I understand then EPiServer has dependency on StructureMap 3.x, but FakeMaker has also dependency on StructureMap 4.x. For some reason on build in my case it copies StructureMap 4.x into bin directory, but in your case StructureMap 3.x.

After installing FakeMaker, reference to StructureMap.dll in my project was to 4.x version.
Maybe you have to 3.x?

Why FakeMaker has dependency on StructureMap at all? EPiServer already has it.

from episerver-fakemaker.

DavidVujic avatar DavidVujic commented on September 7, 2024

Thank you! I have forked your project and also got the errors. However, the errors disappeared when I updated the installed StructureMap NuGet dependencies in both projects. Would that be a possible solution for you?

Here's the forked code with the changes: https://github.com/DavidVujic/SingletonPage

I will keep this issue open and try to solve the (maybe remove) dependency to StructureMap in the upcoming version of FakeMaker.

from episerver-fakemaker.

marisks avatar marisks commented on September 7, 2024

Now this works because references are to the 3.x:
image

But there is still NuGet dependncy on 4.x and when upgrading or installing new you don't know which version will be picked up.

P.S. StructureMap 4.x is not used in the project - there is no need for it.

from episerver-fakemaker.

DavidVujic avatar DavidVujic commented on September 7, 2024

Ok, good. When updating the two structuremap dependencies (web, net4), the "regular" structuremap is added to your episerver web project, right? I think it is a behavior not caused by FakeMaker (since it is in a different project). But I will investigate how to take care of the dependencies in FakeMaker more smoothly anyway.

/David

29 apr. 2016 kl. 06:40 skrev Māris Krivtežs [email protected]:

Now this works because references are to the 3.x:

But there is still NuGet dependncy on 4.x and when upgrading or installing new you don't know which version will be picked up.

P.S. StructureMap 4.x is not used in the project - there is no need for it.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

from episerver-fakemaker.

marisks avatar marisks commented on September 7, 2024

Maybe updating structuremap web and net4 causes it. But EPiServer has dependency on 3.x and 4.x should be avioded.
image

FakeMaker 1.0.4 had only two dependencies. I think it should be like that (as other dependences are not used in code):
image

from episerver-fakemaker.

DavidVujic avatar DavidVujic commented on September 7, 2024

I have published a new version of FakeMaker to NuGet, with dependencies only to EPiServer.CMS.Core and Moq! https://www.nuget.org/packages/FakeMaker

from episerver-fakemaker.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.