-
Notifications
You must be signed in to change notification settings - Fork 62
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
Rename and FindAllReferences broken across projects in Visual Studio 2019 based on Azure Functions projects #344
Comments
We had discussion internally and ultimately we need to leave the build as-is on-disk instead of moving assemblies around like we do today. This should be do-able but in order to support F5 we need to copy (rather than move) the /bin folder into the correct structure that the Functions host expects. This likely means having some subfolder that represents the host rather than running it directly out of /bin. @soninaren -- this will likely involve changes to the VS tools as they will need to use a different root directory on F5. |
@brettsam this is impacting me as well, is there a workaround? Or is there an ETA on a fix? Thanks! |
I know it's not a very good workaround, but I have refactored our Azure Functions project to use a .NET Standard library project for everything but the function binding methods. This allows unit test projects to again go directly to the source (now in the standard lib project) with Go To Definition. It's unfortunate that this bug results in an architectural change to our projects but it does get us working again. |
Due to a bug in the Azure Functions SDK, Go To Definition and even most intellisense is completely broken, making the entire experience terrible. So we just implement the workaround mentioned in the bug at Azure/azure-functions-vs-build-sdk#344 to place all code in a library instead. The Api project now only contains the azure functions and nothing more. It calls into the DI-injected dependencies as necessary, in particular, it now consumes the IEventHandler<T> instead of implementing those itself.
Due to a bug in the Azure Functions SDK, Go To Definition and even most intellisense is completely broken, making the entire experience terrible. So we just implement the workaround mentioned in the bug at Azure/azure-functions-vs-build-sdk#344 to place all code in a library instead. The Api project now only contains the azure functions and nothing more. It calls into the DI-injected dependencies as necessary, in particular, it now consumes the IEventHandler<T> instead of implementing those itself.
It is quite frustrating to have long-standing and expected Visual Studio behaviour such as intellisense and finding references broken. Affects Functions v3 too |
We are working on a fix. Please find the attached PR. Hopefully we can get the fix deployed soon. Thanks for understanding. |
Rename and FindAllReferences should work with 3.0.8 version of v3 package - https://www.nuget.org/packages/Microsoft.NET.Sdk.Functions/3.0.8 Can you try upgrading to this version and see if it fixes all these issues? |
Visual Studio Version: Visual Studio 2019 (16.3.6)
Summary: We are working with an Azure Functions project with associated unit tests and we’ve found that find all references, rename, etc, for the existing solution (VS 2019) doesn't work across all the projects. We followed all the troubleshooting online (ensure project-to-project references, clearing the intellisense cache, etc), but can’t get these features working across project.
NOTE: I originally opened this issue: dotnet/project-system#5624 , but after a discussion the result was "Wouldn’t it be less impactful to copy the required files into a separate “runtime” subfolder with the desired structure for the runtime than to alter the default placement of these files causing bugs like dotnet/project-system#5624? A simpler set of targets to copy things after the main build may be more reliable."
Steps to Reproduce:
public static bool Test()
{
return true;
}
Expected Behavior: Should find the reference in the unit test project for the method
Actual Behavior: No references found
User Impact: Users can't use the code navigation & smart intellisense features. We've introduced bugs in the code when doing a 'rename' because we trusted Visual Studio to do the right thing.
The text was updated successfully, but these errors were encountered: