Articles in this section
Category / Section

TypeScript Library Upgrade in ASP.NET MVC project

1 min read

This documentation explains How to resolve “cannot find name Map” issue in ASP.NET MVC.

In JavaScript NuGet package updated latest version, the “cannot find name map” issue occurs due to TypeScript library version. To resolve this, add dom,es2015 library in TypeScript. TypeScript provides msbuild options in Visual Studio for this.

Complier option

MSbuild property

Allowed values

--lib-

TypeScriptLib

Comma-separated list of strings

 

Refer https://www.typescriptlang.org/docs/handbook/compiler-options-in-msbuild.html for more details about msbuild.

You should add the <TypeScriptLib>dom,es2015</TypeScriptLib> tag in application ‘csproj’ file. Refer to the following code snippet. 

   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <TypeScriptRemoveComments>False</TypeScriptRemoveComments>
    <TypeScriptLib>dom,es2015</TypeScriptLib>
    <TypeScriptOutFile />
  </PropertyGroup>

 

A simple calendar sample with JavaScript NuGet package has been created and added in the <TypeScriptLib>dom,es2015</TypeScriptLib> in the application’s csproj file.

Sample link: 

https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1465224522.zip


Conclusion

I hope you enjoyed learning about a TypeScript Library Upgrade in ASP.NET MVC project to resolve “cannot find name Map” issue.

You can refer to our ASP.NET MVC feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our ASP.NET MVC example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied