2

I am getting the below error while trying a build a project using .NET8.

error NU1100: Unable to resolve 'Microsoft.NETCore.App.Ref (= 6.0.27)' for 'net6.0'.

The machine doesn't have internet connectivity. Earlier i remember building a .NET project using .NET6 or prior version was requiring to connect to nuget.org and downloading the packages to %user%.nuget.

But with .NET8 i don't see that happening.I tried to build on a machine which has internet connectivity but as part of the build the packages are not downloaded to %user$.nuget.

The difference between the two machines is machine1 doesn't have internet connectivity and is using .NET8 unzipped version and machine2 has internet connectivity and is using Visual Studio 2022 installation which comes with .NET8 runtime.

5
  • A build will trigger a restore if local nuget packages not found. If you want to package the software, use dotnet publish. It will package all nuget dependencies to your outout folder Commented Apr 17, 2024 at 5:03
  • @MarcusHöglund Thank you for your response. Which folder does the build look for the packages.I tried with a fresh installation of VS2022 on my machine and then disconnected the network before building and the build was successful. But on my other machine i have VS installed(without .NET8) and no internet connectivity, and i am using a zip version of .NET8 on that machine, when i tried to build using command line it fails with the above error Commented Apr 17, 2024 at 5:06
  • "i have VS installed (without .NET8)" - you can't build/run .NET 8 app without .NET 8 SDK/runtime. If that's not the goal - please provide a minimal reproducible example. Commented Apr 17, 2024 at 5:25
  • 1
    @GuruStron The unzipped .NET8 SDK is being used to build on a machine where internet connectivity isn't there Commented Apr 17, 2024 at 5:44
  • What is the output of dotnet --version and dotnet --list-sdks? What is the actual VS version on the second (without internet) machine? Commented Apr 17, 2024 at 5:47

1 Answer 1

-1

This package is not compatible with .NET8 try to update it to v8.0.4

Sign up to request clarification or add additional context in comments.

3 Comments

First of al it is not a package per se.
since you are using the DLLs for v6 it will not work with .NET 8
You can compile .NET 6 projects using .NET 8 SDK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.