Open christianbumann opened 9 months ago
I can confirm this issue as well.
I attempted to set the TargetFramework in Directory.Build.props with the following configuration:
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
</Project>
Subsequently, I removed the TargetFramework
from the .csproj files of multiple projects in my solution.
My objective was to streamline the process of upgrading the .NET framework version across all projects from a single location. The projects build without any issues in Visual Studio.
However, when invoking ParseProject
within my CICD scripts, I noticed that in the CustomProjectParserResult
object, the TargetFrameworkVersion
property was set to null
and the IsNetCore
property was set to false
. This resulted in the IsWebApplication()
method returning false
.
I'm currently using Cake.Incubator Version=8.0.0.
Addressing this issue would be greatly appreciated as it would enable the use of Directory.Build.props
and help avoid redundancy in defining the same property values across multiple project files within a solution.
In the file 'src\Directory.Build.props\' settings for all projects were done.
example:
Parsing the project
Setting the AppendTargetFrameworkToOutputPath in the project file itself
Expected Behavior
Respect settings from Directory.Build.props
Current Behavior
It doesn't respect settings from Directory.Build.props
Additional information
<Project Sdk="Microsoft.NET.Sdk">