Oryx
Oryx copied to clipboard
Directory.Build.Props is ignored when attempting to determine the TargetFramework of a csproj file
Bug Report
- At what date and time did you most recently experience the problem?
2022-07-20
- Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.
using Azure/static-web-apps-deploy@v1
-
If your repo is publicly available please share its URL: It isn't public yet
-
What happened?
Detecting platforms...
Could not detect any platform in the source directory.
Error: Could not detect the language from repo.
- What did you expect or want to happen?
Detecting platforms...
Detected following platforms:
dotnet: 6.0.6
-
How can we reproduce it? you can use https://github.com/staticwebdev/blazor-starter/generate and then move
<TargetFramework>net6.0</TargetFramework>
up to a Directory.Build.props file. -
Do you have log output? Please include between the backticks:
Detecting platforms...
Could not detect any platform in the source directory.
Error: Could not detect the language from repo.
@StevenTCramer, Directory.Build.props
file is not supported as a way to detect target frameworks for .NET apps. Oryx is looking for target frameworks in a .csproj
file in the root repo, could you try it with it?
@StevenTCramer,
Directory.Build.props
file is not supported as a way to detect target frameworks for .NET apps.
This is exactly my point. Yes, it works if I put the TargetFramework in the csproj, but the point in Directory.Build.props
is to manage common settings across your solution in a central location. I would expect Oryx to be able to build the same as dotnet build
.
I just ran into this issue as well. Any chance this could get a look?
Same here, would love a fix