You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a benchmark project which csproj looks like this: <Project Sdk="Microsoft.NET.Sdk;Microsoft.Build.CentralPackageVersions/2.0.79"> <PropertyGroup> <RootNamespace>ExampleNameSpace</RootNamespace> <AssemblyName>$(RootNamespace)</AssemblyName> <OutputType>Exe</OutputType> <TargetFrameworks>net5.0</TargetFrameworks> </PropertyGroup> <ItemGroup> <PackageReference Include="BenchmarkDotNet" /> </ItemGroup> <ItemGroup> </Project>
this project is part of a solution that has a Directory.Build.props file that contains configuration:
net462;netstandard2.0;net5.0
when I build the project using this command: dotnet run -c release --framework net5.0
I get errors:
error NU1201: Project is not compatible with netstandard2.0 Project supports: net5.0
error NU1201: Project is not compatible with net462 Project supports: net5.0
when BDN tries to restore the project he generated.
when I go to the csproj the BDN generated, I can see that he generated it with configuration: <TargetFramework>net5.0</TargetFramework> instead of <TargetFrameworks>net5.0</TargetFrameworks>
notice the difference between the two is the missing 's'.
when I add the missing s, and run the bat file containing the commands the BDN tried to run everything works fine.
any suggestions how I can solve this problem?
versions of nugets I'm using:
Microsoft.NET.Test.Sdk: 16.9.1
BenchmarkDotNet: 0.13.0
The text was updated successfully, but these errors were encountered:
To run .Net Framework benchmarks, you must build the project with a .Net Framework version dotnet run -c Release -f net462. Then BDN will build the .Net Core/5.0+ apps if you tell it to do so --runtimes net50 net462.
[Edit] I reread your issue, and it looks like I misunderstood. It seems you're only trying to run .Net 5.0 benchmarks, not Framework. I'm not familiar with Directory.Build.props files.
I have a benchmark project which csproj looks like this:
<Project Sdk="Microsoft.NET.Sdk;Microsoft.Build.CentralPackageVersions/2.0.79"> <PropertyGroup> <RootNamespace>ExampleNameSpace</RootNamespace> <AssemblyName>$(RootNamespace)</AssemblyName> <OutputType>Exe</OutputType> <TargetFrameworks>net5.0</TargetFrameworks> </PropertyGroup> <ItemGroup> <PackageReference Include="BenchmarkDotNet" /> </ItemGroup> <ItemGroup> </Project>
this project is part of a solution that has a Directory.Build.props file that contains configuration:
net462;netstandard2.0;net5.0
when I build the project using this command:
dotnet run -c release --framework net5.0
I get errors:
error NU1201: Project is not compatible with netstandard2.0 Project supports: net5.0
error NU1201: Project is not compatible with net462 Project supports: net5.0
when BDN tries to restore the project he generated.
when I go to the csproj the BDN generated, I can see that he generated it with configuration:
<TargetFramework>net5.0</TargetFramework>
instead of<TargetFrameworks>net5.0</TargetFrameworks>
notice the difference between the two is the missing 's'.
when I add the missing s, and run the bat file containing the commands the BDN tried to run everything works fine.
any suggestions how I can solve this problem?
versions of nugets I'm using:
Microsoft.NET.Test.Sdk: 16.9.1
BenchmarkDotNet: 0.13.0
The text was updated successfully, but these errors were encountered: