Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
NuGet Error NU1019
Scenario
The project 'MyProject' contains a TargetFramework 'net10.0/benchmark' with disallowed characters. TargetFramework names must contain only ASCII characters and must not contain path separators.
Issue
Your project file has a TargetFramework or TargetFrameworks value that contains disallowed characters.
NuGet doesn't allow the following characters in target framework names:
- Path separators (
/or\): These characters break the assets file format and are always disallowed. - Non-ASCII characters: Target framework names must contain only ASCII characters (characters with a value of 127 or less).
This validation is gated behind the SdkAnalysisLevel property:
- SDK analysis level 10.0.300 or later: Path separators in target framework names raise an error. Non-ASCII characters raise a warning.
- SDK analysis level 11.0.100 or later: Both path separators and non-ASCII characters raise an error.
Solution
Rename the target framework values in your project file to use only ASCII characters and remove any path separators.
For example, change:
<PropertyGroup>
<TargetFramework>net10.0/benchmark</TargetFramework>
</PropertyGroup>
To a valid target framework name:
<PropertyGroup>
<TargetFramework>net10.0-benchmark</TargetFramework>
</PropertyGroup>
Feedback
Was this page helpful?
