Service Fabric Refresh Application debug mode - The filename or extension is too long - azure-service-fabric

I am trying to use the new Refresh Application debug mode for Service Fabric but I am getting a deployment error "The filename or extension is too long".
I have tried both Visual Studio 2015 and Visual Studio 2017 Preview 3 with the same error.
Debugging with the "Remove application" mode works with no issues.
I have Service Fabric SDK 2.6.204 and 2.5.216 installed.
Any idea how to find out which file is too long and why would this happen only for refresh mode?

This appears to be a limitation in the tooling and PowerShell, and how the debug engine publishes to the Service Fabric cluster. See this Github issue. There's no known workaround at this time.

Related

Is it possible to debug a Service Fabric application in VS Code?

I would like to be able to deploy and debug a Service Fabric app to my local SF Cluster using Visual Studio Code.
You can write a Powershell script to deploy the application from VS Code, but there is no way to attach to a process for debugging. You'd have to use Visual Studio or Rider to do that.

ETW provider is not discovered automatically for the Service Fabric Stateless ASP.NET Core project type

I have created a "Service Fabric Application" using the "Stateless ASP.NET Core" template found in Visual Studio 2017 Pro 15.3.5. I am using using Service Fabric SDK 2.7.198.
And every time I hit F5 to deploy the sample app to my local SF cluster, the Diagnostic Events window notifies me that there are no ETW providers found in the solution. Could this be because it's a .NET core project using the new .csproj format?
Because when I create a "Service Fabric Application" using the "Stateless Service" template, the ETW providers list is automatically updated to include the provider from the sample Stateless1 app. And the stateless's app project is using the old .csproj format.
I believe this is a known issue that has been fixed in 2.8 release of Fabric SDK, which is due to be published in the Microsoft Ignite 2017 timeframe (end of September).
As a workaround you can just add the relevant provider name explicitly via Diagnostic Events window configuration.
Sorry!
I have double-checked and I have used SF tools 1.8. It was installed during my upgrade to VS 15.4. So I decided to do a clean install of VS 15.4.
I have removed my VS 15.4 installation and manually uninstalled SF SDK 2.8.211 and SF runtime 6.0.211. I have then installed VS 15.4 from scratch. And then installed SF runtime 6.0.219 and SF SDK 2.8.219 (these were the latest at the time of installation) via the Web Platform Installer. I have double-checked that I have version 1.8.20170927.3 of the SF tools installed in Visual Studio.
I reopened my existing sample projects (both Stateless ASP.NET core and Stateless) and the ETW sources were harvested automatically. I have also created a new sample Stateless ASP.NET core project and the ETW sources were also harvested automatically.
So everything works now. Thank you for your support.

Cannot debug project after upgrading to Service Fabric SDK v2.3.301

Recently upgraded to Service Fabric SDK v2.3.301, but for some reason my project got corrupted. I cannot debug the project, I get the following error: "A project with an Output Type of Class Library cannot be started."
It seems that the solution now fails to recognize the Service Fabric App. Yet I am able to deploy to my local cluster.
Anyone had similar issues while upgrading to the new SDK?
Thanks
PS Just in case, the service fabric app is the already set as startup project :o)
We have been using Service Fabric to develop a product for about a year with various versions of the SDK and I see this frequently. It happens both when hitting F5 with the SF Application as the sole startup project and even when right-clicking the SF Application and choosing "Debug -> Start New Instance".
Sometimes I have to try several times before it finally works. Other developers in our team see this as well, going all the way back to v2.0.
One thing that seems to make it happen less frequently is not touching anything on your computer after launching the project. Don't click anything else. Don't select another window. Let go of the mouse. Don't touch the keyboard.
Something I've started doing on the advice of a colleague is choosing "Debug -> Start Without Debugging", then attaching to the process if I want to debug it. I've had better luck with this approach in general - including not getting the "A project with an Output Type of Class Library cannot be started" issue.
I hope that helps.
I have had the same issue a couple of times. I have not been able to identify the source. But I have solved it with the following actions:
Close all Visual Studio windows.
Restart the Service Fabric service: Type services.msc in the windows run tool. Find Microsoft Service Fabric Host Service. Right Click + Restart.
Reset the local cluster: Look at the Service Fabric Local Cluster Manager Icon in the notification area in the right side of the task bar. Right Click + Reset Local Cluster.
Open the problematic solution in Visual Studio.
Clean and Rebuild solution.
Finally run your solution (press F5).
Hope this helps.
The error indicates that the service fabric application project (*.sfproj) is not set as start up project. Please try to change the start up project as some other project and again change it back to service fabric application project and see if that resolves the issue.

Bluemix application debugging not working in Eclipse

When I select "Enable Application Debug" in Eclipse, it is showing "Establishing debug session" in progress window but ends up enabling development mode.
When "Incremental Publish" is selected, it gives error:
Failed to create JMX connection.
The connection failed. Ensure that the remote Liberty profile server is started and that the user name, password, and port number are correct.
Also, /IBMJMXConnectorREST URL is giving 404 error.
Few things on the configuration done:
Using JDK 8
Debug perspective
App memory is 1 GB
Should we configure any other thing ?
NOTE: Java Cloudant Starter pack offered by bluemix is the app's codebase in eclipse
Activating debugging is performed in Eclipse by right-click on the application name under the correct Bluemix server, and selecting Enable Application Debug
Enabling development mode (and thus incremental publish) is one of the steps for turning on debug mode. The tools ended up staying in development mode probably indicates that there are some problem on switching on debug mode after the development mode step is completed.
Can you provide the following information so that I can try to reproduce the problem?
1. What is the version of IBM Eclipse Tools for Bluemix that you are using?
2. What platform are you running on?
3. Do you see any error in the .log file in your workspace?
4. What is the exact version of JDK that you are using? Also, is it a IBM JDK or Oracle JDK?

Why would deploying my azure web role through visual studio take a long time?

When I deploy a web role to azure using the management portal, the process takes about 20 minutes. But, when I deploy using visual studio, it can take hours, and it's stuck in "Initializing"/"Waiting for host". Eventually, it does deploy and run normally.
Any thoughts on what's wrong?
Notes:
I'm deploying through visual studio in order to be able to use Intellitrace and the web deploy.
No errors appear at any time during the deployment
Installing web deploy, RDP, any plugins, etc. will lengthen the deployment time. I am pretty sure that Web Deploy in particular will cause the machine to reboot which adds a few mins. This is probably what you notice most (VM's reboot and it takes awhile to get back).
I believe that deploying from Visual Studio releases the host(s) and acquires a new one. This is evident by the fact that the IP addresses associated with the roles typically change when you deploy from Visual Studio.
But upgrading via the Portal re-images the existing host(s).
That presumably accounts for a significant proportion of the time difference, especially if there isn't a host available in the relevant upgrade or fault domain.