Skip to content
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

Fix Fsharp template #1

Merged

Conversation

TheAngryByrd
Copy link

Fixed issues I had while testing the F# template

Copy link
Author

@TheAngryByrd TheAngryByrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added specific comments to why changes were made

@CodeTherapist
Copy link
Owner

CodeTherapist commented Jul 8, 2019

Thanks for your work 👍 I appreciate always contributions to my work - since it's a great way to learn!
I would like to understand why my dotnet build command was successful. Could you please ellaborate why that could be and which version do you use of Visual Studio / msbuild / dotnet sdk?

@TheAngryByrd
Copy link
Author

So dotnet build would have been successful but you would have has issues running benchmark since no files were listed in the fsproj. Unfortunately there's no good official docs on this subject but the gist of it is fsproj files require fs files to be listed as Compile in an ItemGroup. Also if a file references another type or value in another file, (such as the benchmark referencing the config class) that file must be above listed above it in the file order.

For reference dotnet info

dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.203
 Commit:    e5bab63eca

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.2.203/

Host (useful for support):
  Version: 2.2.5
  Commit:  0a3c9209c0

@TheAngryByrd
Copy link
Author

Without the files in the fsproj:

$ dotnet benchmark ./bin/Release/netstandard2.0/benchmark-template-test.dll
No benchmarks to choose from. Make sure you provided public non-sealed non-static types with public [Benchmark] methods.

With the files in the fsproj:

$ dotnet benchmark ./bin/Release/netstandard2.0/benchmark-template-test.dll

Available Benchmark:
  #0 MyBenchmark


You should select the target benchmark(s). Please, print a number of a benchmark (e.g. '0') or a contained benchmark caption (e.g. 'MyBenchmark'):
If you want to select few, please separate them with space ` ` (e.g. `1 2 3`)
You can also provide the class name in console arguments by using --filter. (e.g. '--filter *MyBenchmark*'):

@CodeTherapist CodeTherapist merged commit 3b817e4 into CodeTherapist:#1028 Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants