Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 234047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:09:12+00:00 2026-05-11T20:09:12+00:00

I managed to cobble together a suitable implementation of a sample game in F#

  • 0

I managed to cobble together a suitable implementation of a sample game in F# with xna. However when i try to instantiate my derived game class, the code throws a FileNotFound exception trying to access the Microsoft.Xna.Framework assembly. Why does this happen?

Code:

#light
open System
open Microsoft.Xna.Framework
open Microsoft.Xna.Framework.Audio
open Microsoft.Xna.Framework.Content
open Microsoft.Xna.Framework.Design
open Microsoft.Xna.Framework.GamerServices
open Microsoft.Xna.Framework.Graphics
open Microsoft.Xna.Framework.Input

type SampleGame() as self =
    class
    inherit Game()
    let mutable manager : GraphicsDeviceManager = null
    let mutable spriteBatch : SpriteBatch = null
    do
        manager <- new GraphicsDeviceManager(self)
    override Game.Initialize() = 
        base.Initialize()
    override Game.LoadContent() = 
        spriteBatch <- new SpriteBatch(manager.GraphicsDevice)
        base.LoadContent()
    override Game.Update(gameTime) = 
        base.Update(gameTime)
        if GamePad.GetState(PlayerIndex.One).Buttons.Back = ButtonState.Pressed then
            self.Exit()
    override Game.Draw(gameTime) = 
        manager.GraphicsDevice.Clear(Color.CornflowerBlue);
        base.Draw(gameTime)
    end

let game = new SampleGame()
game.Run()

I have added the proper references by the way.
Edit: after some exploration, i found that my F# project is being compiled to 64 bit, which does not work with the 32 bit XNA dlls. However VS 2010 doesnt let me change the solution platform. How do i fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:09:12+00:00Added an answer on May 11, 2026 at 8:09 pm

    I don’t know enough about XNA, but is it ‘in the GAC’, or do you need to copy the XNA dlls next to your .exe? It sounds like perhaps having Microsoft.Xna.Framework.dll next to your .exe may solve it.

    EDIT

    Based on the 32/64-bit info, perhaps manually change the “<Platform>” in the .fsproj file. (Right click the project, ‘Unload Project’, then right click again and ‘Edit Whatever.fsproj’, poke the XML to have ‘x86’ (rather than ‘x64’ or ‘AnyCPU’) as the Platform value, save, and right click project and ‘Reload’.) (Various F# bugs in Beta1 conspire to make the Platform/SolutionConfiguration-experience less than optimal.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I managed to cobble together a join statement to give me a single table
I managed to put together a code that prompts users for a list of
I managed to cobble together this statement based on lots of help and copying
I've managed to cobble together a CI system using Jenkins with an Ant build
I managed to create a dynamic three dropdown list using Javascript code and it
I managed to apply this excellent example to my needs: http://code.google.com/p/galleriffic/issues/attachmentText?id=76&aid=-3045121742886940548&name=example-2.html&token=4nlvmgAfVpc5whcXC9UEqHZaSz0%3A1339257750721 With a small
I managed to do it with the next code but there must be an
I have a simple toggle that is working perfectly, manaaged to cobble it together
I managed to write a code that accepts a 32-bit integer and converts it
I managed to run the following code to insert into my table on first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.