New to .NET Core

Cool, thanx.

Fire/Water will only support the “Project” entry.

VS has a menu, shown tin the article, where you can pick either. Since Firer/Water won’t support IIS or IISExpress, I’ll forgot all of that and just look for the first profile with command “Project”. I also use the environment variable from there, now (in the past, the debug engine had it hardcoded to add ASPNETCORE_ENVIRONMEN=Development, and it’ll keep doing that when not present).

The one im looking atlas this:

 "WebApplication": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }

full file:

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:65180",
      "sslPort": 44302
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "WebApplication": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "weatherforecast",
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Marc,
It’s what I thought: the multiple applicationUrl entry is for the project.

I think that, when running in debug mode, you should use the URL in iisSettings:iisExpress:applicationUrl, as it’s the URL the application will listen to in this case.

it’s not though. when I launch the app its on port 500x.

Ah, got it,. from the docs you sent, I should pass this to the app. will do.

https://docs.elementscompiler.com/Platforms/NET/Debugging/AspNetCore/

Some typos:

On first launch, the Fire or Water will also offer to automatically offer
If launchUrl is a relative opath

You tell that:

it will look at several values from the first " profile " entry with a commandName of " Project ".

But for debug, it must use the entry specified for IIS Express, the entry with the project name is used for production.

Last note: it has been done in 1 hour, so 1 month for VS, from a previous remark? :rofl:

Again, no. it uses the Project one. we done use IIS(Express).

if it was, then why would it say

"environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }

?

Well, when I run the project from water, it works fine, and I could get the browser to run https://localhost:5001/.
But from VS it fails, and running following command in project folder “dotnet watch run” it gives folowing error
watch : Could not find a MSBuild project file in ‘C:\Users\Kifah Najem\source\repos\WebApplication10’. Specify which project to use with the --project option.

While when I compile, it generate a .DLL and not .EXE

How does it fail, what error do you get?

That is probably expected. Elements projects do not use the dotnet project format, and you cannot compile them with dotnet.

You can compile them from the command line with EBuild (see Building Projects w/ EBuild), and then run the finished executable by simply launching the stub exe, or by running dotnet run on the .dll. (do a “Run without Debugging” in Water to see there exact command line for the latter).

Hi

I still cannot run and\or deploy a .NET core using element, while using same environment PC to develop using MS VS C# it is working perfectly.

Hi,

I never saw a reply to my last follow-up:

When I run, a dos screen open and close, and there is no error.
I found that when I create new VS C# project, I can see run using IIS express
but when I create project using element I have only run, as if it is a consol application.

Currently my demo expires, so I am creating new VM to make a new installation

1 Like

I can also send you a trial extension, of you prefer. send me a private message.

It seems to be the same as this one: https://talk.remobjects.com/t/oxygene-cant-run-an-asp-net-core-3-1-application-under-vs2019/22985/2

Probably, yeah.

Kifah,

does it work from Water, or whiny run the .exe manually?

Hi,
Yes it runs without any problem

1 Like

Cool, thanx.

The log logged from the thread Patrick referenced will have this fixed then, once we get to it — hopefully next week. In there mean time, isn using Water a sufficient workaround for you?

Hi
When I run water, I cannot see the .NET control, so it is quit difficult for me. So I prefer VS
add to that I have other issue I created new ticket .NET framework with DevExpress 20
:wink:

bugs://84785 got closed with status fixed.

1 Like