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

Solution does not support Live Unit Testing in Visual Studio Enterprise #685

Open
eNeRGy164 opened this issue May 29, 2021 · 4 comments · May be fixed by #686
Open

Solution does not support Live Unit Testing in Visual Studio Enterprise #685

eNeRGy164 opened this issue May 29, 2021 · 4 comments · May be fixed by #686
Labels
kind/bug Something isn't working

Comments

@eNeRGy164
Copy link
Contributor

eNeRGy164 commented May 29, 2021

This is only for developer comfort, not an issue using the SDK itself.

I did try to reproduce this behavior on a clean project, but it seems very specific to the Dapr .NET SDK solution.

Expected Behavior

When enabling Live Unit Testing in Visual Studio Enterprise, it should work.

Actual Behavior

Fails with the message

[15:40:32.665 Error] System.IO.FileNotFoundException: Could not find file 'D:\github\eNeRGy164\dapr\dotnet-sdk.vs\all.sln\v16\lut\7304\i\Dapr.Client\netcoreapp3.1\dapr\proto\common\v1\CommonGrpc.cs'.

A normal build generates an empty CommonGrpc.cs, but a LUT build apparently does not.
I'm not sure if this is a Visual Studio LUT or a Grpc.Tools bug. Or maybe just the combination of both.

A workaround is to generate the empty file if it is a LUT build.

After this LUT works:
image

Steps to Reproduce the Problem

Press play in a Visual Studio Enterprise.

Release Note

RELEASE NOTE:
FIX Support Live Unit Testing in Visual Studio Enterprise.

@eNeRGy164 eNeRGy164 added the kind/bug Something isn't working label May 29, 2021
@eNeRGy164 eNeRGy164 linked a pull request May 29, 2021 that will close this issue
1 task
@rynowak
Copy link
Contributor

rynowak commented Jun 6, 2021

@JamesNK - are you familiar with this problem?

@JamesNK
Copy link

JamesNK commented Jun 6, 2021

No. I don’t have live unit tests enabled

@rynowak
Copy link
Contributor

rynowak commented Jun 6, 2021

Can you try it on an empty grpc project? I don't have Windows/VS easily available. If there's a bug here its in Grpc.Tools - we're not doing anything fancy in this repo.

@eNeRGy164
Copy link
Contributor Author

eNeRGy164 commented Jun 6, 2021

I couldn't reproduce it on an empty solution, even using the Dapr proto files, including shared files and targets.

edit I have the issue now on a smaller slimmed down version.

The effect starts when adding the Directory.Build.props to the src and test directories.
Possible causes I see so far:

  • Signed assembly
  • Internals visible with signed assembly
  • Different output path

I uploaded a repo where LUT does not work, until you remove the 2 .props files (and remove the signed key from the InternalsVisibleTo attribute in DaprClientGrpc.cs)

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

Successfully merging a pull request may close this issue.

3 participants