Forum Discussion
[Expression.Error] We couldn't find the file 'secrets.json'
Hi there,
I'm getting this error "[Expression.Error] We couldn't find the file 'secrets.json'" in VS in my custom connector. It happens when I try to use values from my Azure environment secret file, 'secrets.json', to login to my OAuth2. I've already amended the Project item properties' Build Action to Compile, but it's still not detecting it. Any suggestions?
I've already tried File.Contents but that made me sign in with Windows credentials, plus the absolute path will change between users and deployment. I've included a simplified example of what the secrets.json file looks like.
I found a solution - adding this section to the .mproj file worked. A rebuild of the solution after changing the file property to Compile may also have worked too.
<Compile Include="secrets.json">
<SubType>Content</SubType>
</Compile>
2 Replies
- EHP
Advocate I
I found a solution - adding this section to the .mproj file worked. A rebuild of the solution after changing the file property to Compile may also have worked too.
<Compile Include="secrets.json">
<SubType>Content</SubType>
</Compile>