Reputation: 709
I have an Azure Functions project with the following folder structure:
The SyncAgent.Data
sub-project was created with the command dotnet new classlib --framework netcoreapp2.2
In the same directory, I then ran dotnet add package Microsoft.Azure.DocumentDB.Core
to install the DocumentDB package for the Data
sub-project.
The DocumentRepository
class contains code to connect to a CosmosDB and add a document. The SyncAgent.csproj
file includes the SyncAgentData.csproj
. The Azure Function inside the SyncPartnerCustomers
class calls code from the DocumentRepository
class.
When executed using the VS Code debugger the code runs as expected with no errors. The problem is that IntelliSense is not recognising the Microsoft.Azure.Documents
namespace in the sub-project.
Why is IntelliSense failing to detect the namespace despite the fact the code runs without error?
Upvotes: 1
Views: 1465
Reputation: 709
Not sure what was wrong but deleting all the temp bin
and obj
folders restarting VS Code and re-building the project seemed to fix the issue.
Upvotes: 2