Visual Studio

Hello radzen team,
is there any way to set up a complete radzen application in visual studio?
i hope that debugging and source control are easier.
i tried vs code but the handling is in need to getting used to.
vs is much more handier. i tried to setup a solution but cant get it to work.
i know that this is not your focus but help is much appriciated if theres a way to do that.

Regards
Thomas

Hi Thomas,

In the upcoming release Radzen will generate Visual Studio solution file for .NET Core 2.x projects in the application folder:

You can open the solution in Visual Studio, select project.csproj as startup project and run it:

Visual Studio will download all needed .NET Core dependencies, will execute npm install, will run the .NET Core application and will start Angular application:

Finally, you can browse the application:

You will be able also to add the solution to source control:

Best Regards,
Vladimir

WOW! Thank you for that!
I am very excited about this.

Best Regards
Thomas

Hi Radzen team,
i've tested the Visual Studio solution. Looks great!
But at startup there are some erros/fails
radzen_16520_201832722533.zip (1.5 KB)
Everything runs fine until these lines:
info: Microsoft.AspNetCore.SpaServices[0]
Starting @angular/cli on port 51598...
info: Microsoft.AspNetCore.SpaServices[0]
Starting @angular/cli on port 51598...
fail: Microsoft.AspNetCore.SpaServices[0]
Der Befehl "npm" ist entweder falsch geschrieben oder

fail: Microsoft.AspNetCore.SpaServices[0]
Der Befehl "npm" ist entweder falsch geschrieben oder

Hosting environment: Development
Content root path: C:\Users\Thomas\Documents\RadZen\Recentgen\server

Seem that the path to npm.exe is missing. Perhaps missing PATH entry?
I... respectively VS cant start the application in browser. HTTP error 400/401

Regards
Thomas

Hi Thomas,

Do you have NodeJS installed? We forgot to mention that this is a requirement in order to run Radzen applications with Visual Studio. If not you can get it from nodejs.org.

Hi Atanas,
i can install 8.10.0 or 9.9.0. Any advice or no matter which version?

Regards
Thomas

npm is working now with version 9.9.0.
But i cant start the app into the browser. Perhaps something with the ports?!

radzen_3480_2018327225531.zip (1.6 KB)

launchSettings.json:

{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5000/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"project": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:64710/"
}
}
}

Regards
Thomas

Hi Thomas,

What happens when you open http://localhost:52606/ in your browser?

It looks like VS is changing the ports ramdomly. Nothing happens at http://localhost:52606/ now.

i am not familiar with "which service uses which port for what" :slight_smile: So i send you my actual log.

radzen_10764_20183288144.zip (1.1 KB)

Regards
Thomas

I have tested a the ports i see in the outout window in vs.

The app is starts with http://localhost:58929/

When i start the app in VS the browser shows:

can i set a fix port in VS instead of the randomly changing ports?
I start it again an now the port to start the app is http://localhost:59411/

Regards
Thomas

The Visual Studio Log should show the address at which the Angular application is running e.g.

** NG Live Development Server is listening on localhost:58929, open your browser on http://localhost:58929/ **

Hi Atanas,
sure thats right. but unwieldy.
Im searching for a solution where one can set a fix port for the website in VS: Best port 8000 cause VS starts the browser automatically with this port. If i find a way i will post it here.

Regards
Thomas

EDIT: not VS starts the browser with port 8000… in the server “\Views\Home\Index.cshtml” is a link with port 8000. And this one is displayed in the browser which VS (and Radzen Designer->run) started after buld/debug. so it were great to find a way in VS to set the port the website to 8000.
Sure… its not so important. Its more to work fluidly :slight_smile:

Another thing… i tested around with VS… trying to push the application to github. But i get an error:

Git failed with a fatal error.error: open(".vs/application/v15/Server/sqlite3/db.lock"): Permission denied fatal: Unable to process path .vs/application/v15/Server/sqlite3/db.lock

VS saves his setting (or/and something else) in this path. No need to put it on GitHub.

The solution to this is to put “.vs” in the .gitignore file.

My .gitignore file which works:
.env
.settings
node_modules
server/bin
server/obj
package.lock.json
.vs

Regards
Thomas

project> > recent@ start C:\Users\Thomas\Documents\RadZen\Recent\client
project> > ng serve “–port” “51208”
project>
project> ** NG Live Development Server is listening on localhost:51208, open your browser on http://localhost:51208/ **

The command “ng serve --port” must be set to 8000 fix. Hard to find as a total newbie with this architecture :slight_smile:

Hi Thomas,

In the upcoming version of Radzen (later today) browser will be started automatically when running from Visual Studio.

Best Regards,
Vladimir