none
Angular development in VS 2019 RRS feed

  • Question

  • Is it possible to develop an Angular (7) application completely in VS without using Node.js as a development server and running it during development on either IIS Express or a real IIS?

    Thanks

    Friday, August 23, 2019 8:30 AM

All replies

  • Hi markgoldin,

    Welcome to MSDN forum.

    For your requirement, I am afraid that the answer is negative. As far as I know, developing Angular(7) must be with node.js, it is by design in vs ide. Please refer to this similar issue.

    And after my research, maybe you could follow below DOC to deploy your Angular application to IIS:

     Deploy an Angular Application to IIS

    Any feedback will be expected.

    Best Regards,

    Dylan

    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 

    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Friday, August 23, 2019 10:36 AM
  • Hi markgoldin,

    When you create a asp.net core web application depending on Angular, it need the npm of Node Js. And you can see  the error if you do not install the Node Js:

    1>C:\Users\xxxx\source\repos\xxxxxx\xxxxxx\xxxxxx.csproj(32,5): error : Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE.

    And there  are also some default information in the proj file:

    <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
        <!-- Ensure Node.js is installed -->
        <Exec Command="node --version" ContinueOnError="true">
          <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
        </Exec>
        <Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
        <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
        <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
      </Target>

    The VS reminds that you should install the Node Js component which is required by the Angular template.

    So to avoid this error, you should install the Node Js tool.

    Hope it could help you.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Wednesday, September 4, 2019 9:34 AM