Bot framework missing project.json on deploy - c#

I've developed a bot with Microsoft Botframework using .NET assuming it would run perfectly fine under my linux web host. However, when I publish it to file, transfer it to my linux environment and try to run it with dotnet run I get the following error message:
error DOTNET1017: Project file does not exist '/my/path/bot/project.json'
The project never created a project.json and while I can create one I am beginning to wonder if it is even possible at all to run bot framework under linux at this time. But it seems like everything is on .NET Core so I can't see why not.
I can create the project.json, but I don't know what it should contain. Any ideas?

Unfotunately, Bot Framework isn't on .NET Core yet:
https://www.github.com/Microsoft/BotBuilder/issues/572 https://www.github.com/Microsoft/BotBuilder/issues/1767

Related

My program doesn't excute even installed runtime package

I published my program(.net core 3.1 winform program). but it doesnt excuted even installed .net core 3.1 run-time package. so i install .net core 3.1 sdk package, it works.
why i install sdk instead of run-time package?
The software development kit (SDK) includes everything you need to build and run . NET Core applications, using command line tools and any editor (including Visual Studio). The runtime includes just the resources required to run existing
There was a problem creating a single file by using app.config in the wrong way.
When app.config was used in the correct way, it was confirmed that it works normally only with the runtime sdk.
Previously, both *.dll.config and *.dll were required, but after correcting it, only *.dll.config worked normally.

Cannot run (or host) application migrated from .NET Core 2.1 to .NET Core 3.0. and changing the port

I'm trying to migrate my app from .NET Core 2.1 to .NET Core 3.0. I've seen Microsoft document regarding this kind of migration, but I've also seen 2 or 3 tutorials which are way shorter than it and are enough to migrate the app.
I started with changing the <TargetFramework> from netcoreapp2.1 to netcoreapp3.0. As expected, it caused a few issues regarding all the packages, but I resolved it by upgrading them or changing deprecated methods to another.
Now the things are getting weird. I tried to run the application, but got following error:
Could not load type 'Microsoft.AspNetCore.Mvc.MvcJsonOptions' from assembly 'Microsoft.AspNetCore.Mvc.Formatters.Json, Version=3.0.0.0
OK, happens, not the first time I encounter some issue during this migration and probably not last. According to this topic found on Stack, it is because MvcJsonOptions has been removed in .NET Core 3.0. I tried to search for it in my application, but couldn't find any code. Guess it's some internal stuff then. Anyway, most upvoted solution was to update Swashbuckle to version 5.0, so I did. And here comes my troubles:
When I try to run the application, I get "Failed to bind to address http://localhost:5000". This is strange, because few minutes before I've just run this app but in .NET Core 2.1 and it worked perfectly fine. I have checked ports using netstat and port 5000 isn't used by anything. I'm using IIS Express.
When I change the host, I simply cannot run the application. It just loads forever. I've set some breakpoints, but everything looks fine - it just goes through all the code in the Startup.cs, but then it loads infinitely. What seems to be worse, I tried to change the port on another copy of my app, before migrating it to .NET Core 3.0 and it works perfectly fine. Just changed the numbers in appsettings.json and launchsettings.json and it works.
So in summary, my application fails to bind to my standard address after migrating it to .NET Core 3.0 and when I change it, something very strange is happening and it loads infinitely. Any ideas?
MvcJsonOptions has been removed in .net core 3.0. Try installing Newtonsoft.Json NuGet Package and build your project.

Self-Contained, service asks for Runtime to be installed

Build:
.net core 3.1, asp.net core 3.1.3.
Deployment mode: Self-Contained
Target Runtime Win-x64
RedyToRun, single file.
User: win 10 x64, 1903, 18362.788
Its a simple ASP.NET Core 3.1.3 service that runs locally with users. It should not need to have .NET Core runtime installed (as far as I understand it).
It runs smoothly upon installation. User side, my test VMs and my own development environment.
Yet a handful of users have reported that "after not using it for a while" (say a week) they receive the message box saying "To run this application, you must install .net core. would you like to download it now?"
The weird part is: Even if runtime is installed, it keeps asking for it.
It's self-contained, not runtime dependent, this should not be needed.
Has anyone else had this issue or ideas?
It would seem that issue was that the files extracted into the temp directory was partially cleaned up by windows.. causing the application to crash and burn due to missing files.
Intersting issue that was solved in 3.1.4

Managing Windows firewall with C#(using FirewallAPI)

I want to manage windows firewall using windows API with .NET C# on dotnet 3.5.
This is what I did.
Type netFwPolicy2Type = Type.GetTypeFromProgID("HNetCfg.FwPolicy2");
var manage = (INetFwPolicy2)Activator.CreateInstance(netFwPolicy2Type);
My application builds successfully in Visual Studio 2017, but when I run it I get the following error:
The program '[3240] firewallmanage.exe' has exited with code -532459699 (0xe0434f4d).
And when I compile in .net 4.5, it works perfectly. Please tell me what went wrong.
I built the program in lower version of .net version and copied the reference DLL(Interop.NetFwTypeLib.dll) from build.This dll was causing the issue because of framework dependency but It started working fine after replacing dll

Unable to Build and Run DotNet Core from VS 2017

Issue
I have been unable to build and run any dotnet core application from Visual Studio 2017 (15.5.2). Every time I attempt to run it, VS2017 immediately goes into Break Mode, and stops debugging when I hit continue.
This happens even when I use the New Project from VS2017 and choose a .NET Core template (Console App or ASP.NET Core Web Application).
I have followed Microsoft's directions at Build a C# Hello World app, and have completed the instructions at Prerequisites for .NET Core on Windows.
What I Have Tried
Uninstalling and reinstalling the .NET Core cross-platform development workload in VS2017.
Removing all .NET Core SDK versions from Programs and Features and reinstalling from .NET Core 2.x SDK
What I Can Do
Navigate to the source directory and run dotnet run in Powershell. This successfully runs the application in the terminal.
If I guess the dotnetcore PID correctly, I am able to attach to the running process in VS2017.
Open the project in Visual Studio Code. After VSCode creates the build configurations, it is able to build and debug the code.
I do a majority of development in VS2017, and would prefer to use it for dotnet core as well.
dotnet restore
is very likely to be your best friend. If any files are missing they can be easily recovered in this way. For example, when I created a new VS2017 ASP.NET project I kept getting "System could not be found" errors throughout until I executed the restore command, and now I am on my way. Have you tried that?

Categories