Skip to content

Commit 4ba67b5

Browse files
authored
Add local-packages as nuget source (#671)
* remove cache step * add local source set up step * add one time nuget source set up step * add clear back * update doc for explicitly stating "above proj dir" * delete the file only for local tests * delete nuget cache and undo doc update * remove mardown changes * comments
1 parent b90e88a commit 4ba67b5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,13 @@ code .
3030

3131
4. Configure the Function App located in the [samples](./samples) folder by following the instructions [here](./docs/GeneralSetup.md#configure-function-app)
3232

33-
5. Press F5 to run SQL bindings samples that are included in this repo. The output window should display startup information as well as the function endpoints that were started.
33+
5. Configure a local nuget source that will be used to build the .NET Out-of-Proc sample with the latest locally built extension package.
34+
35+
Building the sample will cause a project to be created and built in the temp directory, which means it does not pick up on the nuget.config for this project. Without adding the source at the global level that project will fail to build since it will be looking for the dev-local version of the package (99.99.99).
36+
37+
Note: This command must be ran from your **home directory** (or a directory outside the project repo).
38+
```powershell
39+
dotnet nuget add source <PATH_TO_REPO_AZURE-FUNCTIONS-SQL-EXTENSION/local-packages>
40+
```
41+
42+
6. Press F5 to run SQL bindings samples that are included in this repo. The output window should display startup information as well as the function endpoints that were started.

src/Microsoft.Azure.WebJobs.Extensions.Sql.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,8 @@
4646
<Copy SourceFiles="@(_Packages)" DestinationFolder="../local-packages" />
4747
<Message Text="Copied sql .nupkg to local-packages" Importance="high" />
4848
</Target>
49+
<Target Name="RemoveNugetPackageCache" BeforeTargets="Build">
50+
<RemoveDir Directories="$(NugetPackageRoot)/$(PackageId.ToLower())/99.99.99"></RemoveDir>
51+
<Message Text="Deleted nuget cache for $(PackageId.ToLower())/99.99.99" Importance="high" />
52+
</Target>
4953
</Project>

0 commit comments

Comments
 (0)