From 31d31f7f9709d02ddbdf1adc65d811f708f35c64 Mon Sep 17 00:00:00 2001 From: Graham Zuber Date: Tue, 27 Oct 2020 20:25:52 -0700 Subject: [PATCH 1/3] Added documentation for build output settings --- .../azure-functions/functions-develop-vs.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/articles/azure-functions/functions-develop-vs.md b/articles/azure-functions/functions-develop-vs.md index 84e6af3ae55db..c14c0e467b0e9 100644 --- a/articles/azure-functions/functions-develop-vs.md +++ b/articles/azure-functions/functions-develop-vs.md @@ -81,6 +81,26 @@ Visual Studio doesn't automatically upload the settings in local.settings.json w Your code can also read the function app settings values as environment variables. For more information, see [Environment variables](functions-dotnet-class-library.md#environment-variables). +## Configure your build output settings + +When building an Azure Functions project, the build tools will clean all assemblies that are shared with the functions runtime from the build output in an effort to save as much space as possible. If you move to a more recent version of any of these assemblies for your project, the build tools might clean them from your build output leaving your project unable to run. If this happens, there are a few settings you can customize in your function's .csproj file: + +```xml + + true + + + + + + +``` + +| Option | Description | +| ------ | ----------- | +| FunctionsSkipCleanOutput | This will tell the build tools to skip cleaning the build output entirely. This might increase the size of your function dramatically, but would preserve all output assemblies. | +| FunctionsSkipCleanOutputAssembly | You can specify one of these for each assembly you would like the build tools to preserve when cleaning the ouput. | + ## Configure the project for local development The Functions runtime uses an Azure Storage account internally. For all trigger types other than HTTP and webhooks, set the `Values.AzureWebJobsStorage` key to a valid Azure Storage account connection string. Your function app can also use the [Azure Storage Emulator](../storage/common/storage-use-emulator.md) for the `AzureWebJobsStorage` connection setting that's required by the project. To use the emulator, set the value of `AzureWebJobsStorage` to `UseDevelopmentStorage=true`. Change this setting to an actual storage account connection string before deployment. From 30a0b05352b4dbd47d3b0332886e9ed2f3e111d4 Mon Sep 17 00:00:00 2001 From: Graham Zuber Date: Thu, 29 Oct 2020 17:50:08 -0700 Subject: [PATCH 2/3] Removed mention of FunctionsSkipCleanOutput. Cleaned up language. --- articles/azure-functions/functions-develop-vs.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/articles/azure-functions/functions-develop-vs.md b/articles/azure-functions/functions-develop-vs.md index c14c0e467b0e9..8c894516b07fc 100644 --- a/articles/azure-functions/functions-develop-vs.md +++ b/articles/azure-functions/functions-develop-vs.md @@ -83,24 +83,16 @@ Your code can also read the function app settings values as environment variable ## Configure your build output settings -When building an Azure Functions project, the build tools will clean all assemblies that are shared with the functions runtime from the build output in an effort to save as much space as possible. If you move to a more recent version of any of these assemblies for your project, the build tools might clean them from your build output leaving your project unable to run. If this happens, there are a few settings you can customize in your function's .csproj file: +When building an Azure Functions project, the build tools will optimize the output so that only one copy of any assemblies that are shared with the functions runtime will be preserved. The result is an optimized build that saves as much space as possible. However, if you move to a more recent version of any of these assemblies in your project, the build tools might not know that these assemblies need to be preserved. In order to ensure that these assemblies are preserved during the optimization process, you can specify them in your function's .csproj file: ```xml - - true - - - - + + + ``` -| Option | Description | -| ------ | ----------- | -| FunctionsSkipCleanOutput | This will tell the build tools to skip cleaning the build output entirely. This might increase the size of your function dramatically, but would preserve all output assemblies. | -| FunctionsSkipCleanOutputAssembly | You can specify one of these for each assembly you would like the build tools to preserve when cleaning the ouput. | - ## Configure the project for local development The Functions runtime uses an Azure Storage account internally. For all trigger types other than HTTP and webhooks, set the `Values.AzureWebJobsStorage` key to a valid Azure Storage account connection string. Your function app can also use the [Azure Storage Emulator](../storage/common/storage-use-emulator.md) for the `AzureWebJobsStorage` connection setting that's required by the project. To use the emulator, set the value of `AzureWebJobsStorage` to `UseDevelopmentStorage=true`. Change this setting to an actual storage account connection string before deployment. From 75595155481f2f0448ae64d2d4418a2c66596654 Mon Sep 17 00:00:00 2001 From: Graham Zuber Date: Tue, 15 Dec 2020 16:43:46 -0800 Subject: [PATCH 3/3] Cleaned up tone and voice Co-authored-by: Glenn Gailey --- articles/azure-functions/functions-develop-vs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/azure-functions/functions-develop-vs.md b/articles/azure-functions/functions-develop-vs.md index 8c894516b07fc..acfb61a8b74da 100644 --- a/articles/azure-functions/functions-develop-vs.md +++ b/articles/azure-functions/functions-develop-vs.md @@ -83,7 +83,7 @@ Your code can also read the function app settings values as environment variable ## Configure your build output settings -When building an Azure Functions project, the build tools will optimize the output so that only one copy of any assemblies that are shared with the functions runtime will be preserved. The result is an optimized build that saves as much space as possible. However, if you move to a more recent version of any of these assemblies in your project, the build tools might not know that these assemblies need to be preserved. In order to ensure that these assemblies are preserved during the optimization process, you can specify them in your function's .csproj file: +When building an Azure Functions project, the build tools optimize the output so that only one copy of any assemblies that are shared with the functions runtime are preserved. The result is an optimized build that saves as much space as possible. However, when you move to a more recent version of any of your project assemblies, the build tools might not know that these assemblies must be preserved. To make sure that these assemblies are preserved during the optimization process, you can specify them using `FunctionsPreservedDependencies` elements in the project (.csproj) file: ```xml