Azure / Azure/azure-functions-host

[Dotnet] ExtensionsMetadataGenerator targets "/bin" question

Open
#8,428 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### What language does your question apply to? (e.g. C#, JavaScript, Java, All)
C#

#### Question
When publishing an Azure Function from inside of Visual Studio 2022, I receive an error where the "..\obj\Release\net6.0\win-x86\PubTmp\Out" folder doesn't contain a bin subfolder.

I resolved this issue by doing the following:

The targets file for the ExtensionsMetadataGenerator specifies a target called "_GenerateFunctionsExtensionsMetadataPostPublish".
This target contains a GenerateFunctionsExtensionsMetadata with has a SourcePath and a OutputPath.

` `

In my local Nuget package I was able to remove the "bin" part from the source and output path.
This resulted in the updated target:
` `

**File:** azure-functions-host/tools/ExtensionsMetadataGenerator/src/ExtensionsMetadataGenerator/Targets/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets

This resolves my issue, and allows me to publish a Function to Azure from inside of visual studio.
Is there a known issue related to this? Because this workaround doesn't really seems to be a proper solution.

Contributor guide

Open the contributing guide

Research direction

Start with azure-functions-host/tools/ExtensionsMetadataGenerator/src/ExtensionsMetadataGenerator/Targets/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets and inspect the _GenerateFunctionsExtensionsMetadataPostPublish target. Reproduce the Visual Studio 2022 publish for a net6.0 win-x86 Azure Function, then compare the expected PublishDir/bin layout with the reported PubTmp/Out layout. Done means determining whether the target paths are correct and documenting or resolving the publish failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.