I am seeing lots of build warnings essentially saying libraries are being restored from .netstandard for service fabric. I am on a Mac, running my SF cluster on Linux vm per the Microsoft docs
warning NU1701: Package 'Microsoft.ServiceFabric.Services 2.7.198' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
My service will deploy to the cluster, but fails to initialize with
Error event: SourceId='System.Hosting',
Property='CodePackageActivation:Code:EntryPoint'.
There was an error during CodePackage activation.The service host terminated with exit code:34304
This post seems to suggest that it is because the vm hosting my cluster is linux, which can't run .net 4.6 libraries, it is erring out.
Is it fair to assume that this is because of the .net standard libaries attempting to run on linux? A bit lost at this time. Any help would be greatly appreciated. Is it possible to run stateful .netcore services on the linux vm?
It seems to be suggested all over the docs, but I haven't seen a full guide for it on linux. All of the Microsoft docs lead to java based services being deployed. I found some yeoman templates for .net core service fabric services, but in another article so no indication these run on linux. Can anyone confirm?
Related
I have a .net core 2.1 application that is hosted on Microsoft Azure App Service.
It worked for a couple of years and hasn't been updated in the last year.
But it stop with error in stdout:
Error:
An assembly specified in the application dependencies manifest (Microsoft.AspNetCore.AzureAppServices.HostingStartup.deps.json) was not found:
package: 'Microsoft.AspNetCore.AzureAppServices.HostingStartup', version: '2.2.0'
path: 'lib/netcoreapp2.1/Microsoft.AspNetCore.AzureAppServices.HostingStartup.dll'
Also it still works well in IIS in a virtual machine.
I've got the similar issue yesterday.
After digging up into this and hadn't found solution, I've created support ticket to Microsoft.
They provided the following recommendations:
Publish with:
<PublishWithAspNetCoreTargetManifest>False</PublishWithAspNetCoreTargetManifest>
Upgrade to .NET Core 2.2
These steps helped me and application returned back to online.
Looks like they stopped support of .NET Core 2.1 version on their Azure App Services. Check this link for detalis:
https://devblogs.microsoft.com/dotnet/net-core-2-1-will-reach-end-of-support-on-august-21-2021/
PS: As far as I can tell, .NET Core 2.2 might be gone soon too. So I'm focusing to move my application to .NET Core 3.1 shortly.
We have an e-commerce ASP .NET MVC application which posts a message in an Azure Service Bus Queue at some point. To interact with the Azure Service Bus we are using Microsoft.Azure.ServiceBus v5.0 package.
Application is hosted in Azure as a WebApp so we are using Application Insights to monitor it but because of the fact that Microsoft.Azure.ServiceBus starting with the version 3.0 has a dependency on System.Diagnostics.DiagnosticSource monitoring is failing (basically nothing is logged to Application Insights).
We found out that this is an known issue:
Troubleshooting Application Insights Agent (formerly named Status Monitor v2)
The question is there are other solutions than downgrade Microsoft.Azure.ServiceBus package to version 2?
Thanks.
As I understand your question correctly, it asks about how to handle this situation where the two nugets have conflicting version requirements for a common child (System.Diagnostics.DiagnosticSource) nuget.
In such cases, you should always use a version of one of the former nugets which has the version of the child nuget version lower as compared to the other. For example, in this case you should use below two compatible nuget packages:
We build our web app with Azure DevOps pipelines and deploy into Azure with an Azure DevOps release. I think today netcore got updated to netcore 3.1.4 on our build agent. But now our Azure DevOps deployment fails, because the netcore 3.1.4 runtime is not yet installed on our app service in Azure.
The error message we are getting:
Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.4' was not found.
- The following frameworks were found:
2.2.8 at [D:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
3.0.3 at [D:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
3.1.1 at [D:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
3.1.3 at [D:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
This makes sense and can happen, but what is the best way to go about fixing this?
I could fix my build to a specific netcore version. But I don't like this, because we do want to keep updating to newer versions, but we don't want a version that is not available in Azure app service.
Am I correct in thinking that we would have to install our services self contained, because otherwise we could get into this issue more often when Azure DevOps is faster with installing patches than Azure?
Or is there a way to force update Azure app service to the new netcore 3.1.4 security patch which would be ideal I think?
I just need some guidance in what is the best approach to fix this issue?
Or is there a way to force update Azure app service to the new netcore 3.1.4 security patch which would be ideal I think?
AFAIK, there is no such a way to force update Azure app service to the new netcore 3.1.4.
We could keep track on the latest releases on the https://aspnetcoreon.azurewebsites.net/, but we could not update it at this moment.
To resolve this issue, we recommend that you publish your app as self-contained produces an application, which includes the .NET Core runtime and libraries, and your application and its dependencies. Users of the application can run it on a machine that doesn't have the .NET Core runtime installed.
Publishing your app as self-contained produces a platform-specific executable. The output publishing folder contains all components of the app, including the .NET Core libraries and target runtime. The app is isolated from other .NET Core apps and doesn't use a locally installed shared runtime. The user of your app isn't required to download and install .NET Core.
You could check this document .NET Core application publishing overview for some more details.
Hope this helps.
If you want version of netcore to be automatically updated as an updated version is available, building our service as self-container seems like a good option: no need to have anything installed on the machine running (ie the version on Azure DevOps and Azure Web App don't have to match).
The main downside of this approach is that the build is going to less deterministic: running your build twice with on the same commit might create different binaries depending on what is currently install on the build agent. if you want to know more, here is an interesting post arguing about why deterministic build is important.
To keep the build determinitic, you can use the Use .Net Core task at the beginning of the build (that will make sure that the desired version of the dotnet sdk is on the agent). You could also add a global.json in your repository to lock for both the build on your dev box and in Azure Dev Ops.
This is a common topic of discussion, and you can find a lot of blogs advocating one or another side.
There were big discussions started when Microsoft released LTS net core 3.1 and it took some time before Azure start supporting the 3.1 runtime as well.
You could find a lot of blogs strongly suggesting to deploy your web apps as self-contained (runtime is ~100MB in size) and cut loose the dependency towards Microsoft supporting the latest runtime. While others advocate that the applications should remain as light weight as possible and the runtime should be set in the pipeline. But that is still up on you. I, myself prefer to deploy self-contained apps after my bad experience with net-core 3.1.
There is no established best practice.
In the past , I've run into the same situation, you can fix this by manually setting the value from RunTime Stack drop down. If you manually update the build processes .yml file
RuntimeStack: 'DOTNETCORE|3.1'
I would like to build .NET Core 2.0 services for a Ubuntu based Service Fabric on my windows machine. From the docs, it seems like I can't use Visual Studios to do this.
Does anyone know the workflow for developing, building, and publishing services in this way? Can't find anything in the docs.
Yes. Anything you compile targeting .NET Core will run on any of the platforms supported by .NET Core. However, there is no built-in publishing support, that would be a separate operation you'd have to set up yourself.
You can find the list of currently supported platforms on the Runtime Identifier page. The current Ubuntu list is:
ubuntu.14.04-x64
ubuntu.14.10-x64
ubuntu.15.04-x64
ubuntu.15.10-x64
ubuntu.16.04-x64
ubuntu.16.10-x64
I am stuck on creating azure batch pool with .net 4.6.1.
I went through those very good resources:
Compute Node - Install .NET 4.6.1
How to get the Windows 2016 Preview OS
and I found out that there is a way to use .net 4.6.1 without installing it manually on a node. There is a programmatic way to set up Windows Ghost image with the latest .net version which is .net 4.6.1 but my node is defined in advance.
I need to have .net 4.6.1 because we use Data Factory and custom activities which are run on azure batch nodes. We upgraded .net version manually on that node but Microsoft doesn't guarantee that the state will preserve and we noticed a few times that node was reset to its original state.
My questions are:
do you know if there is any way on azure portal to choose OS family set to Windows Server 2016 with installed .net 4.6.1 version already?
does anybody know when there will be any os with .net 4.6.1 available?
or should I go with StartTask feature and try to install .net 4.6.1 manually? However, that option sounds like some workaround and not the correct solution.
There is not. They have said that when server 2016 releases on azure, it will be available on batch. Until then, the 4.6.1 install as a startup task is your only option. They also will, at some point, allow us to use custom images, rather than their pre-made images.
Updated 2016-02-07:
You can now deploy OS Family 5 under Cloud Services Configuration in Azure Batch, which is equivalent to Windows Server 2016 (as Marketplace/VM image).
Previous answer:
Answers to your questions:
do you know if there is any way on azure portal to choose OS family set to Windows Server 2016 with installed .net 4.6.1 version already?
Yes, you can change the "Image Type" to Marketplace and select 2016-Datacenter which is Windows Server 2016.
does anybody know when there will be any os with .net 4.6.1 available?
As per above, it's available now for Marketplace (IaaS) under 2016-Datacenter. The Batch team is currently working to support OS Family 5 as a guest OS for Cloud Services.
or should I go with StartTask feature and try to install .net 4.6.1 manually? However, that option sounds like some workaround and not the correct solution.
You can always install it as part of a start task and is considered the proper solution for Azure Batch proper for compute nodes with Windows Server < 2016.
You will still have to use the StartTask to install .NET 4.6.1. In the first resource you mentioned, there's a small piece of code that checks the current .NET installation and installs+reboots if needed.
If possible, downgrade your application's .NET version to 4.5.2 to save the hassle of restarting the node.