# DotnetToolResource

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

## Definition

```go
type DotnetToolResource interface {
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- [`IComputeResource`](/reference/api/go/aspire.hosting/icomputeresource.md)
- [`Resource`](/reference/api/go/aspire.hosting/resource.md)
- [`ResourceWithArgs`](/reference/api/go/aspire.hosting/resourcewithargs.md)
- [`ResourceWithEndpoints`](/reference/api/go/aspire.hosting/resourcewithendpoints.md)
- [`ResourceWithEnvironment`](/reference/api/go/aspire.hosting/resourcewithenvironment.md)
- [`ResourceWithWaitSupport`](/reference/api/go/aspire.hosting/resourcewithwaitsupport.md)

## Methods

- [WithToolIgnoreExistingFeeds](/reference/api/go/aspire.hosting/dotnettoolresource/withtoolignoreexistingfeeds.md) -- `method` -- Configures the tool to use only the specified package sources, ignoring existing NuGet configuration.
  ```go
  WithToolIgnoreExistingFeeds() DotnetToolResource
  ```
- [WithToolIgnoreFailedSources](/reference/api/go/aspire.hosting/dotnettoolresource/withtoolignorefailedsources.md) -- `method` -- Configures the resource to treat package source failures as warnings.
  ```go
  WithToolIgnoreFailedSources() DotnetToolResource
  ```
- [WithToolPackage](/reference/api/go/aspire.hosting/dotnettoolresource/withtoolpackage.md) -- `method` -- Sets the package identifier for the tool configuration associated with the resource builder.
  ```go
  WithToolPackage(packageId string) DotnetToolResource
  ```
- [WithToolPrerelease](/reference/api/go/aspire.hosting/dotnettoolresource/withtoolprerelease.md) -- `method` -- Allows prerelease versions of the tool to be used
  ```go
  WithToolPrerelease() DotnetToolResource
  ```
- [WithToolSource](/reference/api/go/aspire.hosting/dotnettoolresource/withtoolsource.md) -- `method` -- Adds a NuGet package source for tool acquisition.
  ```go
  WithToolSource(source string) DotnetToolResource
  ```
- [WithToolVersion](/reference/api/go/aspire.hosting/dotnettoolresource/withtoolversion.md) -- `method` -- Sets the package version for a tool to use.
  ```go
  WithToolVersion(version string) DotnetToolResource
  ```
