# DotnetToolResource

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.2.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface DotnetToolResource
  extends IComputeResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport {
  withToolIgnoreExistingFeeds(): DotnetToolResource;
  withToolIgnoreFailedSources(): DotnetToolResource;
  withToolPackage(packageId: string): DotnetToolResource;
  withToolPrerelease(): DotnetToolResource;
  withToolSource(source: string): DotnetToolResource;
  withToolVersion(version: string): DotnetToolResource;
}
```

## Methods

- [withToolIgnoreExistingFeeds](/reference/api/typescript/aspire.hosting/dotnettoolresource/withtoolignoreexistingfeeds.md) -- `method` -- Ignores existing NuGet feeds
    ```typescript
  withToolIgnoreExistingFeeds(): DotnetToolResource
  ```
- [withToolIgnoreFailedSources](/reference/api/typescript/aspire.hosting/dotnettoolresource/withtoolignorefailedsources.md) -- `method` -- Ignores failed NuGet sources
    ```typescript
  withToolIgnoreFailedSources(): DotnetToolResource
  ```
- [withToolPackage](/reference/api/typescript/aspire.hosting/dotnettoolresource/withtoolpackage.md) -- `method` -- Sets the tool package ID
    ```typescript
  withToolPackage(packageId: string): DotnetToolResource
  ```
- [withToolPrerelease](/reference/api/typescript/aspire.hosting/dotnettoolresource/withtoolprerelease.md) -- `method` -- Allows prerelease tool versions
    ```typescript
  withToolPrerelease(): DotnetToolResource
  ```
- [withToolSource](/reference/api/typescript/aspire.hosting/dotnettoolresource/withtoolsource.md) -- `method` -- Adds a NuGet source for the tool
    ```typescript
  withToolSource(source: string): DotnetToolResource
  ```
- [withToolVersion](/reference/api/typescript/aspire.hosting/dotnettoolresource/withtoolversion.md) -- `method` -- Sets the tool version
    ```typescript
  withToolVersion(version: string): DotnetToolResource
  ```
