How to enable debug in Rider from JetBrains for .net core project.
When I press debug it show
Error running Default: This configuration cannot be debugged.
Anyone knows what config I need to create or what I need to do in order to debug .net core web api hello world project
.Net core debugger isn't supported yet. But it's coming soon
Related
When i deploy the application from Visual Studio to Azure app service using Framework/Runtime dependent mode, then app service run properly.
But when application is deployed using CICD (using VSTS), then app service fails with above mentioned error in title and following error is logged in stdout log files :
Error:
An assembly specified in the application dependencies manifest (App.deps.json) was not found:
package: 'System.Diagnostics.PerformanceCounter', version: '4.5.0'
path: 'runtimes/win/lib/netcoreapp2.0/System.Diagnostics.PerformanceCounter.dll'
But the dll is present in mentioned path under .netcoreapp2.0.
I am publishing the application using VSTS agent.
If i restart the app service then it works fine.
This is one of those errors that can come up for a thousand unrelated reasons. -Everytime- I get this error it's because I've upgraded Nuget packages in my project and one of those packages uses a version of the .Net Core SDK I haven't installed locally. I suspect since you're using the Framework dependent mode it could be an issue if it sandboxes you away from other SDK's (not sure if it does, just thinking out loud).
Make sure your .Net Core SDK's are up to date.
Try publishing it and sending the whole framework with it if you're using .Net Core as the backend (and not the old framework).
Check your NuGet's and make sure they're all supported on the framework you're specifying. I've seen cases where a 4.5 framework assembly 'might' work locally but then error out on the server. If one of them targets an SDK that isn't on the server you'll get this.
https://www.blakepell.com/asp-net-core-http-error-502-5-ancm-out-of-process-startup-failure
Since it works fine when you restart the app service, you could add a Azure App Service manage task to restart Azure App Service in your pipeline:
steps:
- task: AzureAppServiceManage#0
displayName: 'Restart Azure App Service'
inputs:
azureSubscription: azureSubscriptionName
Action: 'Restart Azure App Service'
WebAppName: AppServiceName
It seems that the first time you try to run, your application can not find this .dll that is required on the server. What you can do is to add this in your .csproj file:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Adding the above snippet will export all DLLs needed to run the application (assuming SDK is not available, and runtime is quite lightweight to contain non essential libraries).
I develop ASP.NET Core 2.0 application which works on full framework <TargetFramework>net461</TargetFramework>. Ususally to debug it I use IIS Express: just click green arrow in Visual Studio 2017. It worked OK. But today it stopped working properly. Application runs but all requests hang. No exceptions are thrown. In Windows Logs/Application I see this:
Application 'MACHINE/WEBROOT/APPHOST/MY.APP.HERE' with physical root 'C:\code\MY.APP.HERE\' failed to start process with commandline 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Username\AppData\Local\Temp\tmp35D5.tmp"', ErrorCode = '0x80004005 : 0.
Source of the message is IIS Express AspNetCore Module.
Any ideas what's the reason and how to fix it?
UPDATE: I see A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\code\PATH.TO.APP.HERE\bin\Debug\net461\win7-x64\publish\'. whily running dotnet MyApp.exe.
iisreset - try it one time - As it was working before , hope it works !
The full error message is:
Microsoft Visual Studio
Unable to attach to the process. The debuggee memory space does not have the expected debugging export table.
Now, the only place i found this message is here: https://github.com/dotnet/coreclr/blob/master/src/pal/prebuilt/corerror/mscorurt.rc
Core clr is installed on the machine but the application running in IIS is plain old 4.5 web forms.
Anyone has a clue?
You would attach to dnx.exe process if you debug ASP.NET Core applications, since ASP.NET Core applications are standalone Console applications invoked through the dotnet runtime command. They are not loaded into an IIS worker process.
https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
I'm reporting this error when I try to execute in debug the application:
The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
The Microsoft .NET Framework version specified by you for debugging is incorrect.
I'm using Visual Studio 2008 and .NET Framework 3.5.
I've got this problem with a particular project. Another project with the same framework and visual studio version works perfectly.
This suggests me that this is a problem of the project.
Any idea of why? Which property to set?
Thank you very much
Check to ensure that the application pool you are running the site under is set for the correct .Net runtime version. In IIS you can set that up in IIS Manager site configuration. With IISExpress you just need to modify the applicationhost.config file to set the site to use the correct app pool, or configure the app pool to use the proper version.
I'm trying to migrate an ASP.NET 2.0 app (WebForms) to ASP.NET 3.5. I've finally fixed a 500.19 IIS 7.5 error I was having. Now it will run, so long as I don't attempt to debug it. If I do attempt to debug it I get an error message. I've searched for help on this error and there's precious little out there. Here's the text of the error message:
Unable to start debugging on the web server. Check for one of the following.
The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
The Microsoft .NET Framework version specified by you for debugging is incorrect.
Please see the Visual Studio .NET debugger documentation for correctly specifying the Microsoft .NET Framework version your application is going to use for debugging.
Well, as far as I know, I'm using the correct version of the .NET Framework (3.5) for this app. Although I am not as familiar with IIS 7.5 on Windows 7.
I found that I had to get into IIS and change the application pool that my upgraded ASP.NET app was using. It had been assigned to an application pool that's associated with .NET 4.0. I changed it to one related to .NET Framework 2.0.