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

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Why not do: People p; cin >> p.name; cin >>… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Now i got it. I have to rename MySQL.ttinclude to… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer I just went through this problem 10 minutes ago and… May 12, 2026 at 1:19 am

Related Questions

I am a latecomer to XML - have to parse an XML file. Our
I've found a sample for a sorted JList, but my application is powered by
I've become interested in algorithms lately, and the fibonacci sequence grabbed my attention due
I managed to create a class using CodeDom and add a single method to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.