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 6595103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:53:47+00:00 2026-05-25T17:53:47+00:00

When dynamically referencing assemblies in .fsx using #I and #r , VS highlights the

  • 0

When dynamically referencing assemblies in .fsx using #I and #r, VS highlights the following usages of imported types and writes “The namespace or module ‘XXX’ is not defined”. Is it ok?

For example, in the following code

#I @".\Tools\FAKE"
#r "FakeLib.dll"

open Fake

Target "Hello" (fun _ -> trace "hello!")

Run "Hello"

VS highlights Fake and says “The namespace or module ‘Fake’ is not defined”, it also highlights Target and Run. I have this problem in VS 2010 SP1 and in VS 11 CTP. This issue makes writing F# scripts a bit harder task than it could be.

By the way, IntelliSence for “common” types works well. FakeLib.dll and FakeLib.xml are present in the .\Tools\FAKE directory. The code runs well.

Update 1
Here’s the screenshot of the situation. You can see that VS resolves assembly FakeLib correctly (in a tooltip), and that at the same time Intellisense “see” standard types (tooltip over Console) class.

enter image description here

Update 2
I think there’s something wrong with the IntelliSense on my work workstation, because it (IntelliSense) behaves itself quite strange. When I start VS and open .fsx file, IntelliSense refuses to resolve even standard types/classes, and it doesn’t underlines FAKE classes, it does nothing. But after some period of time and some manipulation over code IntelliSense starts working for standard types and underlines FAKE types.

Moreover, when I’ve created the similar code on my home workstation there were no problems, IntelliSense works as it should.

  • 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-25T17:53:47+00:00Added an answer on May 25, 2026 at 5:53 pm

    If you put the full path into the #r directive, you’ll get full IntelliSense. The #I directive, while convenient, prevents IntelliSense from working properly though the code will run just fine. This is true for both loose scripts and those found in projects. Have a look at Tomas Petricek’s [FSharp.AsyncExtensions](http://github.com/tpetricek/FSharp.AsyncExtensions%5D project.

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

Sidebar

Related Questions

My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
I have some dynamically created inputs which are not server-side controls. I want to
I dynamically select a string built using another string. So, if string1='David Banner', then
I'm referencing the article reference To create a UserControl dynamically and pass it back
Dynamically add textbox using jquery from the link above i want something like that,
Please, I have the following problem: I'm trying to dynamically load a WCF RIA
I dynamically change DOM on client-side to add some new input fields using JavaScript.
Dynamically I want to edit/update hosts(etc/hosts) file to add domain. To edit hosts(etc/hosts) file
Dynamically I am creating the linear layout and adding the views to linear layout
I´m dynamically creating an instance of a class with reflection and this works fine,

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.