dotnet / dotnet/sdk

File-based programs need to clear TargetFramework when specifying TargetFrameworks

Open
#53,735 1 comment 0 reactions 0 assignees View on GitHub
Area-run-file untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

Currently, `TargetFramework` is always added via `GetDefaultProperties`. Then if the file specifies `` the project will have both `TargetFramework` and `TargetFrameworks` properties:

```


false
C:\Users\tomas\AppData\Local\Temp\dotnet\runfile\File1-34e808bfa14b153ad6d8c4485779136637a1ee56a88b4e2182458fa43bd77084
File1
$(AssemblyName)
artifacts/$(AssemblyName)
artifacts/$(AssemblyName)
true
.cs=Compile;.resx=EmbeddedResource;.json=None;.razor=Content
false
true
false
false
Exe


net10.0

enable
enable
true
true





net9.0
net10.0
$(Tfm1);$(Tfm2)
false
$(Features);FileBasedProgram







```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.