Page 1 of 1

Using Zeus with ASP.Net Core

Posted: Wed Jan 20, 2021 5:33 am
by jussij
Installation
Follow the installation steps found here: http://www.zeusedit.com/phpBB3/viewtopic.php?f=5&t=8135

Creating a Test ASP.Net Project

1. Start the Zeus IDE and use the Tools, Language Shells, Command Prompt menu to open up a command prompt.

2. Navigate to the directory in which the new project will be created, for example:

Code: Select all

C:\>md \Projects
C:\>cd \Projects
3. Run the following command to create a new ASP.Net MVC application:

Code: Select all

dotnet new mvc -o TestMVC
This should result in the following output:
The template "ASP.NET Core Web App (Model-View-Controller)" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/5.0-third-party-notices for details.

Processing post-creation actions...
Running 'dotnet restore' on TestMVC\TestMVC.csproj...
Determining projects to restore...
Restored C:\projects\TestMVC\TestMVC.csproj (in 43 ms).
Restore succeeded.
You should also now have a new project folder as shown below:

Code: Select all

C:\Projects>dir
 Volume in drive C is Windows
 Volume Serial Number is 3690-9A91

 Directory of C:\Projects

19/01/2021  12:01 PM    <DIR>          .
19/01/2021  12:01 PM    <DIR>          ..
19/01/2021  12:01 PM    <DIR>          TestMVC
               0 File(s)              0 bytes
               3 Dir(s)  128,789,917,696 bytes free
Building the TestMVC ASP.Net Project

1. Using the same Zeus command shell, build the project use the following commands:

Code: Select all

cd \Projects\TestMVC
dotnet build
This should result in the following output:
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
All projects are up-to-date for restore.
TestMVC -> C:\projects\TestMVC\bin\Debug\net5.0\TestMVC.dll
TestMVC -> C:\projects\TestMVC\bin\Debug\net5.0\TestMVC.Views.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:02.86
2. To run the resulting TestMVC.dll file first change to the project folder:

Code: Select all

C:\>cd \Projects\TestMVC
and then use the run command as follows:

Code: Select all

dotnet run
This should result in the following output:
C:\projects\TestMVC>dotnet run
Building...
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\projects\TestMVC
As that output shows the ASP.Net web service is now running.

Start a web browser and open the https://localhost:5001 URL as shown in the output.
dot-net-asp.png
dot-net-asp.png (66.23 KiB) Viewed 2335 times
Creating a Zeus Workspace
As described here a Zeus Workspace can be used to help manage the code base.

To create a workspace do the following:
  • Use the Zeus Workspace, Import menu.
  • In the resulting file open dialog select the *.csproj filter.
  • Select the TestMVC.csproj
These steps will create Zeus workspace for that .Net Core project:
dot-mvc-ws.png
dot-mvc-ws.png (151.1 KiB) Viewed 2333 times
Cheers Jussi