Missing heroku worker dyno - c#

I'v been recently trying to experience with Heroku, to host a c# (Console application) Discord.Net (API) project.
I deployed the entire project using the Heroku CI and then added the Procfile and the package.json with
$git commit
and it responded with "nothing added to commit but untracked files present."
With that I went to the site only to find out that my Worker Dyno that I declared on my profile is missing.
Can someone help me figure out why is the Dyno missing although I declared it?
Procfile:
worker: node Program.cs //The file containing the script
Package:
{
"name": "Test",
"description": "Test",
"version": "0.0.0",
"main": "Program.cs",
"scripts": {
"start": "node Program.cs"
},
"dependencies": {
"discord.net": "1.0.2"
}
}

The procfile MUST'NT contain any extensions... the debugger misses it otherwise.
Unlike the explenation that heroku provides...
Once I removed all extensions it was recognized as a dyno.

Related

azure chatbot not working. after publishing from visual studio(2017)

i done the following steps:
created web app bot (bot framework sdk v4) and perform 'test web chat'. which is successful and the bot responded.
note: Microsoft app id and password are created.
Downloaded the code.
updated bot file(.bot) with luis and qna configuration manually
#{
"appId": "XXXXXXX",
"authoringKey": "xxxxxxxxxx",
"version": "0.1",
"region": "xxxxx",
"type": "luis",
"name": "BasicBotLuisApplication",
"id": "6"
#}
#{
"appId": "XXXXXXX",
"authoringKey": "xxxxxxxxxx",
"version": "0.1",
"region": "xxxxx",
"type": "qna",
"name": "myqna"
#}
and put 'Padlock' with empty value
Also updated the code (Startup.cs,BotServices.cs) and build app locally.
For testing locally,used bot framework emulator and which was successful.
Then 'Publish' the application with visual studio.
Try to connect with 'Test webchat'. The operation failed and received error code(401 and 403).
what shall do? any solutions?
401 is unauthorized so did you make sure your file containing your authorization key got published?
If the file is not part of your solution/project it will not get deployed. Make sure that file is available post deployment on your app service (I presume?), you can use Kudu by going to [AppServiceName].scm.azurewebsites.net
Use the Debug Console to verify the file.
You need to look at your authentication. Usually, there should be some sort of session ID token that your browser session caches after authentication. From what you told us, there doesn't seem to be an authentication step.

FxCop Analysis with .Netcore library failed in VS2015 update 3

I was built my project(Class Library) in .Net core and trying to analyze my code using FxCop in VS2015.
But i am getting following error:
"could not identify platform for project"
Also i tried to set platform for my project. But i can't able to set it.
Any thing i missed here?
thanks,
Suresh
By referring this link Use code analysis with Visual Studio DNX project (.xproj)
I have added following lines in project.Json file now its working.
"frameworks": {
"net46": {
"buildOptions": {
"define": [ "CODE_ANALYSIS" ]
}
},
"netstandard1.6": {
"imports": "dnxcore50"
}
}
Note: After added the code in project.json file, close all visual studio application and start it. Then it will work.

Why does my .Net Core console application have the wrong build target? [duplicate]

Every time I build a project using the new .NET Core RC2 templates I am not provided with a runnable .EXE file. If I hit F5 for debugging my console application it runs fine through the
C:\Program Files\dotnet\dotnet.exe
application. And if I use the
dotnet run
command in the folder, it runs fine as well. But I see no way to run the application without the .NET Core CLI tools.
The contents of my
bin\Debug\netcoreapp1.0\
folder looks like this:
As you can see there is no .EXE file available. Just the dll.
Am I overlooking something? Or is there something wrong with my project.json file?
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Thanks!
There are actually 2 app models in .NET Core:
Portable apps: heavily inspired by "DNX console apps", these apps don't produce .exe files and are instead executed by the .NET Core shared runtime (whose version is defined by the Microsoft.NETCore.App package, thanks to its special type: platform attribute). The corresponding .NET Core runtime must be installed on the machine to be able to use portable apps. If the exact version cannot be found, an exception is thrown when running dotnet run.
Standalone apps: standalone apps are really similar to good old .NET console apps as they produce .exe files. The .NET Core runtime doesn't have to be installed on the machine, because it is directly embedded with the application itself.
You're currently using the first model. To use the standalone model, you need to tweak your project.json:
Add a runtimes section to list the environments your app will target (e.g win7-x64 or ubuntu.14.04-x64). You can find the complete list here.
Remove the Microsoft.NETCore.App dependency. You can replace it by this package instead: "NETStandard.Library": "1.5.0-rc2-24027".
Here's an example of a standalone app:
{
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"warningsAsErrors": true
},
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"NETStandard.Library": "1.5.0-rc2-24027"
},
"frameworks": {
"net451": { },
"netcoreapp1.0": {
"dependencies": {
"System.Net.Ping": "4.0.0-rc2-24027"
},
"imports": [
"dnxcore50",
"dotnet5.6",
"portable-net451+win8"
]
}
},
"runtimes": {
"win7-x64": { }
}
}
The answer is in the documentation with complete steps now.
You can create two types of deployments for .NET Core applications:
Framework-dependent deployment
Self-contained deployment
For a runnable .EXE file, the Publish self-contained should be used.
To create a runnable application from a .NET Core console application you can use the dotnet tool. Just run in your project directory:
dotnet publish --runtime win7-x64
This creates a standalone app (self-contained deployment; includes all necessary libraries consuming at least 60MB on your disk). Of course you can also choose other runtimes, like osx.10.11-x64 or ubuntu.16.04-x64.
If you used the default configuration (New Project -> Console App (.NET Core)), there is no modification of any configuration file necessary.
step 1: remove "type": "platform", from Project.json under frameworks section
step 2: add run time section to your project.json. Note each section is separeted by a comma. Add your runtime. below is just an example for win 10.
"runtimes": {
"win10-x64": {}
}
Step 3: dotnet restore command on your project. ( open cmd, go to your project folder wherever src folder is there, run dotnet restor)
step 4: dotnet pack
step 4: dotnet build -r win10-x64 - or just build.
Step 5: you can notice .exe created under debug/netcore/win10/
In ASP.NET Core try changing your app type to default, in project.json:
"Microsoft.NETCore.App": {
"type": "default",
"version": "1.0.0-*"
}

ASP.NET MVC Core/6: EF 6 scaffolding error

I am using EF 6 with MVC Core/6. My models and db context are in separate project and I use DI to inject the db context into the controllers. But when I try to scaffold the controller using EF 6 as the data context class I am getting the following error:
Error
There was an error running the selected code generator:
'A type with the name MyProject.DAL.ModeIs.MyModel does not exist
Microsoft.VisuaIStudio.Web.CodeGeneration.ActionInvokerb__6_0()
Microsoft. Extensions.CommandLineUtiIs.CommandLineAppIication.Exe
cute(String[] args)
Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execu
te(String[] args)'
RC2 is the first release that somewhat allows you to include non-ASP.NET Core projects in your solution. From my experience I've learned it only works if both projects were created in Visual Studio 2015 Update 2 and they both use .NET Framework 4.6.1.
There is a long running issue on GitHub about this. I've struggled with the workarounds presented in that thread and couldn't waste anymore time messing with it. So I decided to wait until a functional release comes out. I put all my shared code in an ASP.NET Core (.NET Framework) project. Made it look like a class library project by creating an empty project and deleting everything except project.json. Then any functionality that is not supported in that stack, I put in a WebAPI 2 method that I can call from my RC2 project.
This might be too late, however I had the same issue, I fixed it by adding to project.json:
"dependencies": {
.....
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.1.0-preview4-final",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"type": "build"
.....
and
"tools": {
.....
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"imports": [
"portable-net45+win8"
]
},
......
},

Omnsharp's Intellisense not working

I'm on Windows 8.1, using VS Code 1.0.0 and C# for VS Code version 1.0.1-rc2.
The problem is that I can't get Intellisense to work when opening C# projects, but when developing extensions, I do have intellisense enabled.
One thing though, is that when VS Code opens, Omnisharp starts...but, there is an error:
[INFO] Starting OmniSharp at 'c:\dev\TestI'... [ERROR]
Error: connect ETIMEDOUT 192.30.252.126:443
This is my project.json file:
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002392"
}
},
"frameworks": {
"netcoreapp1.0": {}
}
}
I also have "http.proxy" set up already.
Any help is appreciated.
Thanks.
Just in case someone has the same problem. Altough it doesn't seem to be a proxy problem there are manual steps to solve the issue.
Go to, https://github.com/OmniSharp/omnisharp-roslyn/releases/ and download the version of omnisharp you need. Unpack it, add a new item in the VS Code preferences: "csharp.omnisharp": "path/to/where/you/unpacked/the/files/".
Restart VS Code.
Taken from: https://github.com/OmniSharp/omnisharp-vscode/issues/200
First,you should download omnisharp-win-x64-netcoreapp1.0.zip from https://github.com/OmniSharp/omnisharp-roslyn/releases, then unzip to C:\tmp\omnisharp-win-x64-netcoreapp1.0.You will get file C:\tmp\omnisharp-win-x64-netcoreapp1.0\OmniSharp.exe。
setting vscode config for c# Intellisense prompt。
Open vscode menu “File ”->"Option”->"setting", you can edit file settings.json.Add newLine
go to:http://www.freemanwoman.com/running-c-aspnet-core-rc2-in-visual-studio-code-with-the-latest-omnisharp-plugin

Categories