AZ-204 lab 4 .NET 8 CosmosDB question

A Farkas 0 Reputation points
2024-01-31T08:12:50.0933333+00:00

The setup is the one provided by godeploy, windows 11, with .net 8 apparently installed. the az-204 machine lab 4. The solution code from AZ-204 github. The code targets .net 8, not .net 6, as displayed in the github. The code is un-buildable. I took the following steps trying to isolate the issue: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-dotnet-get-started?tabs=azure-cli%2Cwindows dotnet new console --> creates a project targetting .net 8 dotnet add package Microsoft.Azure.Cosmos --> error There are no versions available I am looking for an answer related to this particular setup, not on a newly installed machine. I'm well aware the same two commands work on my machine. What could I do to make it work on the setup in question?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,799 questions
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 42,256 Reputation points
    2024-02-03T15:22:45.6633333+00:00

    hank you for asking this question on the Microsoft Q&A Platform. Microsoft Certification / Exams / Learn is currently not supported in the Q&A forums.

    Maybe one of the links is helpful: Microsoft Training & Certification is supported on their own forums: Microsoft Certification - Exams: https://trainingsupport.microsoft.com/en-us/mcp/forum/mcp_exams Microsoft Certification - Exam Registration: https://trainingsupport.microsoft.com/en-us/mcp/forum/mcp_exams-mcp_exam Microsoft Certification - Vouchers/Discounts: https://trainingsupport.microsoft.com/en-us/mcp/forum/mcp_exams-mcp_offer

    Hope this helps. JS

    == Please Accept the answer if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. Pinaki Ghatak 5,575 Reputation points Microsoft Employee
    2024-02-04T11:47:04.6266667+00:00

    Hello A Farkas

    The error NU1100 that you’re encountering typically indicates that NuGet cannot find the package you’re trying to add. Here are a few things you could try:

    Check your NuGet sources: Make sure that the NuGet package source is properly configured and that it includes the necessary feeds to find the Microsoft.Azure.Cosmos package.

    Try restoring the packages: You can do this by running dotnet restore in the console. This command will attempt to restore all the packages referenced in your project.

    Check the .NET version: Ensure that the .NET version on your machine matches the one targeted by the project. You mentioned that the project targets .NET 8, so you should have .NET 8 installed on your machine.

    Update the package: If the package is already installed, try updating it to the latest version using dotnet add package Microsoft.Azure.Cosmos --version x.x.x, where x.x.x is the latest version number.

    Remember, these suggestions are based on the typical causes for the NU1100 error. I hope this answers your quesion.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.