webapinetcore - Microsoft.AspNetCoreOData.WebApiTemplate.6.0 1.0.0-Nightly202503100506
OData ASP.NET Core Web Template Pack for Microsoft Template Engine
To install the templates in this package, run 'dotnet new --install Microsoft.AspNetCoreOData.WebApiTemplate.6.0::1.0.0-Nightly202503100506'.
PM> Install-Package Microsoft.AspNetCoreOData.WebApiTemplate.6.0 -Version 1.0.0-Nightly202503100506 -Source https://www.myget.org/F/webapinetcore/api/v3/index.json
> nuget.exe install Microsoft.AspNetCoreOData.WebApiTemplate.6.0 -Version 1.0.0-Nightly202503100506 -Source https://www.myget.org/F/webapinetcore/api/v3/index.json
> dotnet add package Microsoft.AspNetCoreOData.WebApiTemplate.6.0 --version 1.0.0-Nightly202503100506 --source https://www.myget.org/F/webapinetcore/api/v3/index.json
<PackageReference Include="Microsoft.AspNetCoreOData.WebApiTemplate.6.0" Version="1.0.0-Nightly202503100506" />
Copy to clipboard
source https://www.myget.org/F/webapinetcore/api/v3/index.json
nuget Microsoft.AspNetCoreOData.WebApiTemplate.6.0 ~> 1.0.0-Nightly202503100506
Copy to clipboard
> choco install Microsoft.AspNetCoreOData.WebApiTemplate.6.0 --version 1.0.0-Nightly202503100506 --source https://www.myget.org/F/webapinetcore/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "webapinetcore" -SourceLocation "https://www.myget.org/F/webapinetcore/api/v2"
Install-Module -Name "Microsoft.AspNetCoreOData.WebApiTemplate.6.0" -RequiredVersion "1.0.0-Nightly202503100506" -Repository "webapinetcore" -AllowPreRelease
Copy to clipboard
ASP.NET Core OData Web API Template
| Component | Build | Status |
|---|---|---|
| ASP.NET Core ODataDotNetTemplate | Rolling | |
| ASP.NET Core ODataDotNetTemplate | Nightly |
This repository provides a .NET template for creating an ASP.NET Core Web API project with OData support. It supports configurations for .NET 8.0 and above, with appropriate setups for each version.
Prerequisites
- Download and install .NET
- Visual Studio IDE - optional
- VS Code - optional
Getting Started
Follow these steps to use the template locally:
1. Clone the Repository
git clone https://github.com/OData/AspNetCoreODataDotNetTemplate.git
2. Project Build and Content Generation
This project uses MSBuild to automate the build process and generate content from templates. Below are key files involved in this process.
Files
- Directory.Build.targets:
tools/Directory.Build.targetscontains custom MSBuild targets applied to all projects in the directory and its subdirectories. Also contains targets for managing version information. - Directory.Build.props:
Directory.Build.propscontains common properties applied to all projects in the directory and its subdirectories.
3. Build Repo
Navigate to the cloned repository directory and build the project to restore necessary packages and dependencies:
cd <repository-directory>/AspNetCoreODataDotNetTemplate/sln
dotnet build
4. Use build.cmd/build.ps1 Script
At the root, there is a PowerShell script (build.ps1) that automates building, creating NuGet packages, and testing the AspNetCoreOData template project.
Usage
To run the script, open a PowerShell terminal, navigate to the directory containing the build.cmd file, and execute the script with the -help parameter:
build.cmd -help
Examples
- Build the solution with default settings:
.\build.cmd
- Build the solution in Debug configuration and run tests with detailed verbosity:
.\build.cmd -SolutionPath ".\sln\MySolution.sln" -c "Debug" -Test -v "Detailed"
- Build the solution and create NuGet packages:
.\build.cmd -SolutionPath ".\sln\MySolution.sln"
- Running tests:
.\build.cmd -Test
Artifacts
Building this repo produces artifacts in the following structure:
artifacts/
bin/ = Compiled binaries and executables
obj/ = Intermediate object files and build logs
log/
*.log = Log files for test runs and individual tests
$(Configuration)/
*.binlog = Binary logs for most build phases
packages/
$(Configuration)/
*.nupkg = NuGet packages for nuget.org
IncrementVersion.ps1
This script increments the version number in the specified msbuild props file. The version number can be incremented in the following ways:
- Major version increment
- Minor version increment
- Revision version increment
- Version release number increment
Parameters
versionPath: The path to the msbuild props file where the version number is specified.lastReleaseCommit: The ID of the last commit to be released.forceMajorIncrement: Whether to force an increment of the major version number.versionRelease: The version number to be released. For example, preview, beta, alpha, etc.forceMinorIncrement: Whether to force an increment of the minor version number.Help: Show help.
Examples
Increment the minor version number in the Directory.Build.targets file:
Template Project Structure
The generated project will have the following structure:
ODataWebApiApplication/
├── Controllers/
│ └── CustomersController.cs
├── Models/
│ └── Customer.cs
│ └── Order.cs
├── Properties/
│ └── launchSettings.json
├── EdmModelBuilder.cs
├── ODataWebApiApplication.csproj
├── ODataWebApiApplication.http
├── Program.cs
└── appsettings.Development.json
└── appsettings.json
Code of Conduct
This project has adopted the .NET Foundation Contributor Covenant Code of Conduct. For more information see the Code of Conduct FAQ.
.NET Foundation
This project is supported by the .NET Foundation.
ODataDotNetTemplate is a Copyright of © .NET Foundation and other contributors. It is licensed under MIT License
Signature validation information
Informational
Signature Hash Algorithm: SHA256 Timestamp: 3/10/2025 5:06:53 AM Verifying author primary signature's timestamp with timestamping service certificate: Subject Name: CN=DigiCert Timestamp 2024, O=DigiCert, C=US SHA1 hash: DBD385EE62DBD23E7BE4F67148508724D5865B45 SHA256 hash: 76769FA8F2632F1F430B3A2330AED65675FED773DB05D665B9059398438F9ADB Issued by: CN=DigiCert Trusted G4 RSA4096 SHA256 TimeStamping CA, O="DigiCert, Inc.", C=US Valid from: 9/26/2024 12:00:00 AM to 11/25/2035 11:59:59 PM Signature type: Author Verifying the author primary signature with certificate: Subject Name: CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US SHA1 hash: F25C45D17C53D4E0D1DC9FB9DFD0731FCF904B77 SHA256 hash: 566A31882BE208BE4422F7CFD66ED09F5D4524A5994F50CCC8B05EC0528C1353 Issued by: CN=DigiCert Trusted G4 Code Signing RSA4096 SHA384 2021 CA1, O="DigiCert, Inc.", C=US Valid from: 7/27/2023 12:00:00 AM to 10/17/2026 11:59:59 PM
OwnersOData Team |
AuthorsODataWebApiTemplate |
Project URLhttps://github.com/OData/ODataDotNetTemplate |
LicenseUnknown |
Tagsaspnet templates web webapi api service odata |
SignatureValidation: Valid |
Info2 total downloads |
| 2 downloads for version 1.0.0-Nightly202503100506 |
| Download (34.82 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
1.0.0-Nightly202503100506 | 34.82 KB | Mon, 10 Mar 2025 05:14:34 GMT | 2 |
|
||
|
|
1.0.0-Nightly202503070749 | 34.83 KB | Fri, 07 Mar 2025 07:59:26 GMT | 0 |
|
||
|
|
1.0.0-Nightly202503061249 | 34.63 KB | Thu, 06 Mar 2025 13:01:25 GMT | 0 |
|
||
|
|
1.0.0-Nightly202503050510 | 33.75 KB | Wed, 05 Mar 2025 05:22:41 GMT | 0 |
|
||
|
|
1.0.0-Nightly202503041728 | 33.75 KB | Tue, 04 Mar 2025 17:38:34 GMT | 0 |
|
||
|
|
1.0.0-Nightly202503030506 | 33.75 KB | Mon, 03 Mar 2025 05:16:08 GMT | 0 |
|
||
|
|
1.0.0-Nightly202503022025 | 33.75 KB | Sun, 02 Mar 2025 20:34:33 GMT | 0 |
|
||
|
|
1.0.0-Nightly202503012315 | 33.75 KB | Sat, 01 Mar 2025 23:22:35 GMT | 0 |
|