-
-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable including references in autogenerated csproject #1197
Comments
I thought I could work around this by emitting a BenchmarkDotNet/src/BenchmarkDotNet/Templates/CsProj.txt Lines 4 to 5 in 58fde64
I definitely understand why this is there, and think it's a good idea. It just prevented the work around I had hoped would be cheap of ensuring that there's a |
This issue is very similar to #1023 :
@ViktorHofer @ericstj @eerhardt would it be possible to make |
@billwert if I won't be able to find any clean solution the only idea I currently have it to introduce a concept of |
The reason the reference to This means that this reference is "private" to Possible fixes:
|
FWIW this does not solve the problem (tested myself) |
I've come here from https://stackoverflow.com/questions/58990324/how-to-benchmark-two-different-versions-of-the-same-non-nuget-library-in-benchma <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="d:\save\projects\winforms\artifacts\bin\System.Windows.Forms\Release\net6.0\System.Windows.Forms.dll" />
<Reference Include="d:\save\projects\winforms\artifacts\bin\System.Windows.Forms.Primitives\Release\net6.0\System.Windows.Forms.Primitives.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
</ItemGroup>
</Project> but |
Today, if a benchmark needs a reference to a Nuget package it goes into the original project (microbenchmarks.csproj, say) and then does not need to be in the auto generated csproj.
I’d like to enable us to remove the requirement that we run .NET Framework tests on VMs / machines that have Visual Studio installed: dotnet/performance#627. The new Microsoft.NetFramework.ReferenceAssemblies package is precisely the answer.
But it fails because the generated project doesn’t include the package reference I added:
Interestingly, on my machine the second build (which includes --no-dependencies) works on my machine, probably because it’s using some ambient state at that point.
I see that csproj.txt doesn’t have a parameter for this, so we need some feature to plumb this through.
The text was updated successfully, but these errors were encountered: