Start by installing the .NET 10 SDK, which includes runtime for .NET, ASP.NET Core, and .NET Desktop. Then, create an application with:
dotnet new webapp -n dotnet-webapp
Edit the dotnet-webapp.csproj and add the following to instrument the application with the New Relic .NET Agent:
<ItemGroup>
<PackageReference Include="NewRelic.Agent" Version="10.47.2" />
<PackageReference Include="NewRelic.Agent.Api" Version="10.47.2" />
</ItemGroup>
Run the app locally with this command:
dotnet run