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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:54:30+00:00 2026-06-13T02:54:30+00:00

I have a problem that I suppose comes from my ASP.NET MVC project using

  • 0

I have a problem that I suppose comes from my ASP.NET MVC project using Type Script. For testing I have created a project using the HTML TypeScript template. I could perfectly create two modules and use one of them in the other like this:

import authModule = module("Authenticate");
import testModule = module("TestModule");

export module SiteMaster {
  authModule.Authenticate.run();
  testModule.TestModule.run();
}

It is generating correctly the JavaScript like this:

define(["require", "exports", "Authenticate", "TestModule"], function(require, exports, __authModule__, __testModule__) {
  var authModule = __authModule__;
  var testModule = __testModule__;

  (function (SiteMaster) {
    authModule.Authenticate.run();
    testModule.TestModule.run();
  })(exports.SiteMaster || (exports.SiteMaster = {}));
})

Then I have copied to my ASP.NET MVC 4.5 the compiler command from my Typescript project.

  <Target Name="BeforeBuild">
<Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc&quot; --module amd @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />

It is compiling correctly. Apparently is compiling correctly.

But there is a problem: when I create the same modules in my ASP.NET MVC application I receive the compilation errors in the import line:

The name '"Authenticate"' does not exist in the current scope
A module cannot be aliased to a non-module

Ths same for TestModule.

I have included a reference below to the module and the error remains, and look in the Typescript template the reference was not necessary.

/// <reference path='Authenticate.ts'/>

What is wrong here?

  • 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-13T02:54:32+00:00Added an answer on June 13, 2026 at 2:54 am

    I think I have solved the problem. As I suspected it was in the compiler command. I fact I was not using the compiler command generated the TypeScript template.

    I was using, in my ASP.NET MVC project this command:

      <Target Name="BeforeBuild">
    <Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc&quot; --module amd -target ES5 @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" IgnoreExitCode="true" />
    

    This compiler command here is working:

      <Target Name="BeforeBuild">
    <Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc&quot; --module amd @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
    

    Can someone explain me what is the meaning of the target parameter.

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

Sidebar

Related Questions

I have installed the ASP.NET MVC 2 RC and opened the default example project,
We have the problem that we have the open project files in our SVN
I have question that comes from a algorithms book I'm reading and I am
I've inherited (no pun intended) an old ASP.NET 1.1 project that is now .NET
I have an unforeseen problem regarding a sort of Multi Tenancy implementation in ASP.NET
In a couple of scripts that I use I have problem that is intermittent.
I have a problem that I'm working on for quite some time now. I
I have a problem that has been driving me batty. I have code that
I have a problem that occurs only in a production environment, deployed at heroku.
I have a problem that is getting embarrassingly out of hand. I'm working with

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.