Skip to content

Cannot build file-based libraries #51064

@jjonescz

Description

@jjonescz

Version: .NET 10 RC1

// lib.cs
#:property OutputType=Library
class C;

Run:

dotnet build lib.cs

Observe:

Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'.

This worked in prior .NET 10 preview releases and hence it's a regression.

Metadata

Metadata

Assignees

Labels

Area-run-fileItems related to the "dotnet run <file>" effort

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions