How to reference Microsoft.Solver.Foundation in vs12?
Asked Answered
F

2

9

I'm trying to add Solver Foundation to a project I'm working on in Visual Studio 2012, but I can't find it in the list.

I opened one of the example projects, and the reference is Microsoft.Solver.Foundation however I tried searching Microsoft.S on all of the available lists, in my project, and it didn't come up.

How do I get Solver Foundation into my project?

Foreclosure answered 21/9, 2012 at 15:3 Comment(3)
Which operating system are you running? Do you have VS 2010 installed alongside? And which MSF version and edition are you running? When I chose Open With... VS 2012 the MSF project opened and executed without problems on Windows 8.Logrolling
MSF latest version. The project works fine, i just can't import it into my own project.Foreclosure
Targeting .Net 4.5 instead of .Net 4 is what kept me from seeing the dll in the reference list.Airspeed
G
9

I've just installed VS 2012 on my computer. I also have VS 2010 installed. I've re-installed Solver Foundation, but still no such project type in VS 2012 (unlike VS 2010). I would also like to know how to add this project type to the templates in VS 2012.

However, this might help you: it is enough to add the reference in your project to the Microsoft.Solver.Foundation.dll. The location might be:

C:\Program Files\Reference Assemblies\Microsoft\Framework\ .NETFramework\v4.0\Microsoft.Solver.Foundation.dll

if your Framework version was 4.0 before installing VS 2012.

Golf answered 21/9, 2012 at 18:6 Comment(0)
L
8

The Microsoft.Solver.Foundation assembly is primarily targeted at .NET 4 and is thus included in the .NET 4 reference assemblies, as is also indicated by MSt:s answer.

This means that if you create a project that targets .NET 4.0, the Microsoft.Solver.Foundation assembly will show up in the Assemblies / Framework list when you are adding a new reference in Visual Studio 2012.

On the other hand, the MSF assembly will not show up if your project is targeting .NET 4.5. If you are targeting .NET 4.5, you will instead need to browse to the assembly manually, typically to the path that MSt has pointed out already, i.e. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0.

Logrolling answered 22/9, 2012 at 18:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.