You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please only report specific issues with flyctl behavior. Anything like a support request for your application should go to https://community.fly.io. More people watch that space and can help you faster!
Describe the bug
F# web applications are not recognized as a .NET project even though they use the same tooling and build system as a C# application.
PS X:\> dotnet new web -lang F# -o Sample
The template "ASP.NET Core Empty" was created successfully.
Processing post-creation actions...
Restoring X:\Sample\Sample.fsproj:
Determining projects to restore...
Restored X:\Sample\Sample.fsproj (in 1.23 sec).
Restore succeeded.
PS X:\> cd Sample
PS X:\sample> dotnet run
Building...
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5214
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: X:\sample
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
PS X:\sample> fly launch
Scanning source code
Could not find a Dockerfile, nor detect a runtime or framework from source code. Continuing with a blank app.
Warning: This organization has no payment method, turning off high availability
Creating app in X:\sample
We're about to launch your app on Fly.io. Here's what you're getting:
Organization: ************** (fly launch defaults to the personal org)
Name: ************* (generated)
Region: Stockholm, Sweden (this is the fastest region for you)
App Machines: shared-cpu-1x, 1GB RAM (most apps need about 1GB of RAM)
Postgres: <none> (not requested)
Redis: <none> (not requested)
Tigris: <none> (not requested)
? Do you want to tweak these settings before proceeding? No
Warning: This organization has no payment method, turning off high availability
Created app '************' in organization 'personal'
Admin URL: ********
Hostname: *******
Wrote config file fly.toml
PS X:\sample>
Running the same with a C# project works as expected
PS X:\> dotnet new web -o Sample2
The template "ASP.NET Core Empty" was created successfully.
Processing post-creation actions...
Restoring X:\Sample2\Sample2.csproj:
Determining projects to restore...
Restored X:\Sample2\Sample2.csproj (in 144 ms).
Restore succeeded.
PS X:\> cd Sample2
PS X:\Sample2> dotnet run
Building...
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5137
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: X:\Sample2
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
PS X:\Sample2> fly launch
Scanning source code
Detected a .NET app
Warning: This organization has no payment method, turning off high availability
Creating app in X:\Sample2
We're about to launch your .NET app on Fly.io. Here's what you're getting:
Organization: ********* (fly launch defaults to the personal org)
Name: ********* (generated)
Region: Stockholm, Sweden (this is the fastest region for you)
App Machines: shared-cpu-1x, 1GB RAM (most apps need about 1GB of RAM)
Postgres: <none> (not requested)
Redis: <none> (not requested)
Tigris: <none> (not requested)
? Do you want to tweak these settings before proceeding? No
Warning: This organization has no payment method, turning off high availability
Created app '*********' in organization 'personal'
Admin URL: ***********
Hostname: ***********
Wrote config file fly.toml
Validating X:\Sample2\fly.toml
✓ Configuration is valid
==> Building image
returnfilepath.SkipDir// Stop walking the directory
}
where it is checking explicitly for *.csproj, both C# and F# (and even VB.NET) share the same file format and contents in the project files to truly support .NET apps (and not just C#) the glob/regex expresion should check for any of the *.fsproj, *.csproj (and even *.vbproj should work tbh same tooling) file formats instead as copying the files generated for the C# project in the F# project and then running fly deploy works as expected
The text was updated successfully, but these errors were encountered:
Please only report specific issues with
flyctl
behavior. Anything like a support request for your application should go to https://community.fly.io. More people watch that space and can help you faster!Describe the bug
F# web applications are not recognized as a .NET project even though they use the same tooling and build system as a C# application.
I followed the instructions given here https://fly.io/docs/languages-and-frameworks/dotnet/ but with the exception of using an F# project (
.fsproj
) rather than a C# project (.csproj
)fly version
: fly.exe v0.3.25 windows/amd64 Commit: 8fb314c BuildDate: 2024-10-21T16:49:16Z** Command output: **
Running the same with a C# project works as expected
The culprit likely is in this file here:
flyctl/scanner/dotnet.go
Lines 12 to 14 in 8fb314c
and
flyctl/scanner/dotnet.go
Lines 60 to 64 in 8fb314c
where it is checking explicitly for
*.csproj
, both C# and F# (and even VB.NET) share the same file format and contents in the project files to truly support .NET apps (and not just C#) the glob/regex expresion should check for any of the*.fsproj
,*.csproj
(and even*.vbproj
should work tbh same tooling) file formats instead as copying the files generated for the C# project in the F# project and then runningfly deploy
works as expectedThe text was updated successfully, but these errors were encountered: