Open Assura-Mark opened 1 month ago
Team Triage: Please attach a minimal repro ZIP with a project we can restore to reproduce the problem and investigate further.
You should be able to reproduce it with the above project.
I was able to reproduce the issue using the provided example solution.
When attempting to restore in VS:
Error occurred while restoring NuGet packages: Invalid restore input. No target frameworks specified. Input files: C:\temp\NuGetRestoreBug\NuGetRestoreBug\NuGetRestoreBug.esproj, C:\temp\NuGetRestoreBug\NuGetRestoreBug\project.json.
When attempting to restore in the CLI using dotnet restore:
C:\Program Files\dotnet\sdk\9.0.100-preview.4.24267.66\NuGet.targets(170,5): error : Invalid restore input. No target frameworks specified. Input files: C:\temp\NuGetRestoreBug\NuGetRestoreBug\NuGetRestoreBug.esproj, C:\temp\NuGetRestoreBug\NuGetRestoreBug\project.json.
In case it helps, I see a similar issue with my esproj
and just set TargetFramework
property to fix it. Unsure if same issue though...
Example: <TargetFramework>net8.0</TargetFramework>
In case it helps, I see a similar issue with my
esproj
and just setTargetFramework
property to fix it. Unsure if same issue though...Example:
<TargetFramework>net8.0</TargetFramework>
Thanks for the suggestion, I've just tried it:
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.784122">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
</Project>
and it seems to still have the same problem:
dotnet restore .\NuGetRestoreBug.sln
Determining projects to restore...
C:\Program Files\dotnet\sdk\8.0.300\NuGet.targets(169,5): error : Invalid restore input. No target frameworks specified
. Input files: C:\Projects\NuGetRepro\NuGetRestoreBug\NuGetRestoreBug.esproj, C:\Projects\NuGetRepro\NuGetRestoreBug\pr
oject.json. [C:\Projects\NuGetRepro\NuGetRestoreBug.sln]
I'd guess it's a different issue.
NuGet Product Used
dotnet.exe, Visual Studio Package Management UI
Product Version
Visual Studio 17.10.1, dotnet 8.0.300
Worked before?
Visual Studio 17.9.1
Impact
It's more difficult to complete my work
Repro Steps & Context
Steps:
Context: I'm using an .esproj that contains an Nx project. The Nx project adds a project.json file which NuGet appears to be trying to process now - previously it was ignored.
I've had limited success in the command line by forcing
<RestoreProjectStyle>Unknown</RestoreProjectStyle>
in the .esproj, but it doesn't appear to be respected by Visual Studio's package management UI.Verbose Logs