-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e2910e
commit 2e089de
Showing
12 changed files
with
99 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<DuendePackageDir Condition=" '$(DuendePackageDir)' == '' ">$(MSBuildThisFileDirectory)packages</DuendePackageDir> | ||
</PropertyGroup> | ||
|
||
<Target Name="PackAndMove" Condition="'$(IsPackable)' == 'true'"> | ||
<Exec Command="dotnet pack --configuration Release --output $(DuendePackageDir)" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<Import Project="../../samples.props" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This directory contains internal documentation for the foss repository, with notes on the | ||
build process and tooling. See | ||
[here](https://github.com/DuendeSoftware/docs.duendesoftware.com/) for user documentation. | ||
|
||
## Topics | ||
### NuGet | ||
- [Local Packages](nuget/local.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Building Packages Locally | ||
|
||
## PackAndMove | ||
Each project in this repository includes a `PackAndMove` target (see | ||
Directory.Build.targets), which will compile and package the project as a NuGet package | ||
and then copy the output to a configurable directory (\packages by default). You can | ||
`PackAndMove` a single project by changing to its directory and running `dotnet build | ||
-t:PackAndMove`, or you can run the same command from the root of the repository to pack | ||
and move all packages in the repo. | ||
|
||
The intent of PackAndMove is to be a convenience when building packages locally. By | ||
default, `dotnet pack` scatters its output into many nested subdirectories like | ||
`\identity-model\src\IdentityModel\bin\Debug\`. Moving all the packages into a single | ||
location makes it quick to access them and allows you to easily consume the package from a | ||
test or sample project. | ||
|
||
### Configuring Output Dir for PackAndMove | ||
To configure the output directory, either set the `DuendePackageDir` environment variable, | ||
or pass the `DuendePackageDir` property to the build command: | ||
|
||
#### Environment Variable | ||
```ps | ||
# powershell | ||
$Env:DuendePackageDir=C:\packages | ||
dotnet build -t:PackAndMove | ||
``` | ||
|
||
#### Command Line Argument | ||
``` | ||
dotnet build -t:PackAndMove -p:DuendePackageDir=C:\packages | ||
``` | ||
|
||
|
||
## Consuming Local Packages | ||
If you want to try out local builds of your packages, you can add a directory (such as the | ||
directory you use for PackAndMove) as a package source to NuGet. To do so, add the feed to | ||
your NuGet.Config file. You can do this for your entire user account or on a per-project | ||
basis. On windows, you personal config file is located at %appdata%\NuGet\NuGet.Config. | ||
More details from Microsoft's docs | ||
[here](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior). | ||
|
||
```xml | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="Local Builds" value="C:\packages" /> | ||
<!-- Other sources omitted --> | ||
</packageSources> | ||
</configuration> | ||
``` | ||
|
||
You can also set this configuration via most IDEs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<Import Project="../../samples.props" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<Import Project="../../samples.props" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<PropertyGroup> | ||
<NoWarn>$(NoWarn);1591;NU1507</NoWarn> | ||
<LangVersion>latest</LangVersion> | ||
<IsPackable>false</IsPackable> | ||
<ImplicitUsings>true</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<!-- <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> --> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters