This project is read-only.

MayhemCore could not be installed

Mar 13, 2012 at 9:13 PM

I was following the instructions in the tutorial "Setting up Visual StudioTo Write Modules" and ran into a problem where it says "In order to create a Mayhem Module we have to be able to connect to the Mayhem Core, so install that package."

When I try to install the MayhemCore module I get an error box:

'MayhemCore' could not be installed because it is not compatible with any project in the solution. The package targets the following frameworks: .NETFramework, Version=v4.0

The first time I got this I had just created a class library project with the defaults, which do indeed specify .Net v4.0. So then I created a new project and made sure I specified .Net v3.0 when I created the project, but I still get the same error, it is still complaining about .Net 4.0 even though the project specified v3.0. I've verified the project expects 3.0 by bringing up the property page for the project and under Common Properties/Framework and References it says "Targeted framework: .NETFramework, Version=v3.0".

Since it says "the package targets", I'm guessing that means MayhemCore, so I just created yet another project, made sure .Net 4.0 was specified, (and verified with the property page) and I get the same error. I also verified that the .Net framework v4.0 is installed on my machine.

I'm using Visual Studio 2010.


Mar 13, 2012 at 9:28 PM

When I create a Class Library project, then add the nuget package mayhem core, it adds successfully. This is what my VS Window looks like after. Can you verify that you are using a class library project and not changing anything else.

Mar 13, 2012 at 10:36 PM

Ah, that was the problem. I did create a Class Library project, but it was for C++, not C#. When I created one for C# it worked fine. Thanks!

Mar 13, 2012 at 10:45 PM

Awesome, I have updated the tutorials to reflect that it has to be a C# class library project.