This issue isn't necessarily related to Azure Monitor. It's more related to C# and Visual Studio. However, for the community to best assist, you need to elaborate more on your machine setup.
I didn't experience any build issues and my project is .NET 4.7.2 Web Forms project in Visual Studio 2022 17.8.0 with Application Insights 2.21.0.249, the latest nuget package, referenced (project snippet below, sections omitted for brevity)
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
...
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
...
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ApplicationInsights, Version=2.21.0.429, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.ApplicationInsights.2.21.0\lib\net46\Microsoft.ApplicationInsights.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
In checking OnExecutingRequestStep
in ApplicationInsightsHttpModule class, it looks like it may be trying to restore some log activity; but without a stacktrace, it's difficult to say. It may be writing/reading this activity from disk, and based on the messages you're shared, it may be an issue with the path. You can use tools like ProcMon to see what path the module is actually to trying to write/read to/from.