Open vsfeedback opened 2 months ago
@BrennanConroy FYI
Update your Microsoft.AspNetCore.Mvc.Testing reference.
Hi @BrennanConroy .
Now it works! with Microsoft.AspNetCore.Mvc.Testing 9.0.0-rc.1.24452.1
Thank you so much Sincerely Jorge
same situation here: got the exception => update to 9.0.0-rc.1.24452.1 => solved! BR Werner
Unfortunately this didn't help me. I have a .NET 8 API project I wanted to convert to 9 and I get this error in my tests. I have tried the specific version and the release version of 9.0.0 and I still get the error. I have verified there aren't any nuget updates for this release or preview.
I did notice that I had to manually add Microsoft.Extensions.Caching.Memory
with version 9.0.0
as something was still pointing to the pre-release version of it and it has a known vulnerability. I also see under Framework that it shows Microsoft.NETCore.App
with version 9.0.0-rc.2.24473.5
. I figure that should also not be an RC.
I guess for now I will stick with .NET 8.
This is what my CSPROJ looks like.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.9.0-beta.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MY.API\MY.API.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
<ItemGroup>
<Folder Include="OpenTelemetry\" />
</ItemGroup>
</Project>
This issue has been moved from a ticket on Developer Community.
Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview
Version 17.12.0 Preview 2.0
Solution: Minimal Web Api and Xunit (.NET 9.0.0-rc.1.24431.7)
WebApiXunit3.zip
The error:
The PipeWriter ‘ResponseBodyPipeWriter’ does not implement PipeWriter.UnflushedBytes
The same code works fine in .NET 8
Original Comments
Feedback Bot on 9/18/2024, 00:30 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Feedback Bot on 9/19/2024, 02:55 AM:
Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.