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

Enum defined in assembly not referenced. #13

Closed
austinlparker opened this issue Nov 27, 2018 · 8 comments
Closed

Enum defined in assembly not referenced. #13

austinlparker opened this issue Nov 27, 2018 · 8 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@austinlparker
Copy link
Contributor

When trying to use Cake.Coverlet, I get an intellisense error creating a CoverletSettings - The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [build.cake]

The following is the task:

Task("Test")
.IsDependentOn("Build")
.Does(() =>
	{
		var project = ("./test/LightStep.Tests/LightStep.Tests.csproj");
		var coverletSettings = new CoverletSettings {
			CollectCoverage = true,
			CoverletOutputFormat = CoverletOutputFormat.opencover,

		};
		var testSettings = new DotNetCoreTestSettings {
			Logger = "xunit;LogFilePath=../../build/test_results.xml",
			Verbosity = DotNetCoreVerbosity.Minimal
		};
		DotNetCoreTest(project, testSettings, coverletSettings);
});

I'm using Cake 0.30 on MacOS with dotnet version 2.1.401.

@austinlparker
Copy link
Contributor Author

I also get the following error when I run the task, regardless of if CoverletOutputFormat is defined. - Calculating coverage result... /Users/austinparker/.nuget/packages/coverlet.msbuild/2.3.2/build/netstandard2.0/coverlet.msbuild.targets(27,5): error : Specified output format '0' is not supported [/Users/austinparker/workspace/lightstep-tracer-csharp/test/LightStep.Tests/LightStep.Tests.csproj]

@Romanx
Copy link
Owner

Romanx commented Nov 28, 2018

Hi there,

I think it's due to the way that i'm turning the enumeration into a string to pass into the MsBuild task. I'll take a look at this later today, hopefully it should just be a case of using Invariant ToString() I don't have a mac to test it.

Would you be interested in trying a pre-release build to verify this works for you locally?

@Romanx Romanx self-assigned this Nov 28, 2018
@Romanx Romanx added the bug Something isn't working label Nov 28, 2018
@austinlparker
Copy link
Contributor Author

Sure, I can try the pre-release build.

@Romanx Romanx closed this as completed in 39fd8d0 Dec 2, 2018
@Romanx Romanx added this to the 2.0 milestone Dec 2, 2018
@Romanx Romanx reopened this Dec 2, 2018
@Romanx
Copy link
Owner

Romanx commented Dec 2, 2018

Hi @austinlparker, i've merged this into master and it'll be released along with the Coverlet tool functionality in 2.0. Thanks for the contribution!

@Romanx
Copy link
Owner

Romanx commented Dec 4, 2018

@austinlparker This has now been released. Please let me know if you have any issues.

@Romanx Romanx closed this as completed Dec 4, 2018
@giusepe
Copy link

giusepe commented Jan 23, 2019

Hi @Romanx,

I'm still getting the same error with the coverlet 2.2.1

screenshot 2019-01-23 at 17 17 10

I'm running it on Mac as well.

@Romanx
Copy link
Owner

Romanx commented Jan 24, 2019

@giusepe How are including Cake.Coverlet in your cake file? Are you using #tool directive?

@giusepe
Copy link

giusepe commented Jan 24, 2019

Hi @Romanx,

Oh sorry, I forgot to link it before: https://github.com/reactiveui/punchclock/blob/update-ci-to-reactiveui/build.cake
I'm not, and now that you mentioned, I think I should have....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants