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

  • Home
  • SEARCH
  • 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 8271559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:52:49+00:00 2026-06-08T06:52:49+00:00

I have a number of my own .js files containing javascript code in a

  • 0

I have a number of my own .js files containing javascript code in a MVC4 project in Visual Studio 2012. The intellisense does not work in these .js files and the error checking is showing spurious errors such as ‘Too many characters in character literal’ and ‘a namespace cannot directly contain members such as field’.

I think what is happening is that it is not identifying the code as javascript (including the jquery files auto added by the mvc4 template). Possibly the file type .js is not associated to Javascript. I’ve tried Tools -> Optioins -> Text Editor -> File Extension & added js as Script Editor but that didn’t work.

If I put a script block in a cshtml page it identifies my Javascript code perfectly but I need to separate my js into separate files.

Any help would be much appreciated 🙂

  • 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-06-08T06:52:50+00:00Added an answer on June 8, 2026 at 6:52 am

    It sounds like you set the Build Action to Compile, which treats it as C#.
    Set it to Content instead.

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

Sidebar

Related Questions

I have a set of files, each containing a single (integer) number, which is
I have a number of JavaScript classes each implemented in its own JavaScript file.
I have many Java files from a project which have not been formatted properly.
Possible Duplicate: Why does this code not increment a counter properly? I have a
I have some content files that I would like to share between a number
I have to deal with various input files with a number of fields, arbitrarily
I have an ASCII file containing a number of surfaces created in a seismic
On my hard drive I have a folder containing a number of Excel workbooks.
I have a project, calendars , that has been worked on by a number
I have recently been copying and moving a large number of files (~400,000). I

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.