Comments (4)
Hello @Denyyyys 👋,
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
from setup-dotnet.
Hi @Denyyyys, we did had look into this and we see that cache-dependency-path does not accept multiple paths in a array. You can try by passing multiple paths with help of pipe operator, that should hopefully resolve your issue. Please let us know incase you still face the issue. Please find a small example below for your reference.
with:
dotnet-version: 8.0.x
cache-dependency-path: |
'./appsettings.Development.json'
'./appsettings.json'
from setup-dotnet.
Hello @suyashgaonkar.
Thank you for your response!
Unfortunatelly, your solution didn't work for me. When I use the same configuration as you showed, it implicitly sets cache: false, which means the cache is not used. In this case, everything works as expected, but I want to use the cache. When I try to add cache: true and use the pipe operator like this:
dotnet-version: 8.x
cache: true
cache-dependency-path: |
'./backend/WebServer'
'./tetBackend'
I see the following error: Error: Some specified paths were not resolved, unable to cache dependencies. You can see my job logs for this configuration using that link. My repository in that state is available under this link, so feel free to use this repo.
Even if you figure out how to use the cache with package.lock.json files from ./testBackend and ./backend/WebServer paths, the build pipeline fails during the test phase.
Any help you can provide would be greatly appreciated!
from setup-dotnet.
Hi @Denyyyys , the way cache dependency works is that builds and restore the cache depending on the changes found in packages.lock.json file, hence we need to pass the absoloute path to the package.lock.json file in the cache-dependency-path.You can check the official documentation on the same in the following url: https://github.com/actions/setup-dotnet?tab=readme-ov-file#caching-nuget-packages.
We did fork your repo to work upon the issue and attached screenshot has the result with suggested solution.
Another alternative that we can suggest to help you with caching dependecy is actions/cache Github action. You can find detailed documentation and examples related to caching in the follwing links :
https://github.com/actions/cache
https://github.com/actions/cache/blob/main/examples.md#c---nuget
from setup-dotnet.
Related Issues (20)
- Problem matcher does not work with normal verbosity HOT 5
- Dotnet version looking for a version that is not available HOT 1
- All dotnet commands fail due to environment variables HOT 6
- .NET Test invoking an Azure Function: An error occurred trying to start process 'func' with working directory. The system cannot find the file specified. HOT 6
- .NET MAUI IOS HOT 4
- Share this site HOT 1
- Fallback to different installation directory if `/usr/share/dotnet` doesn't available due to permissions HOT 4
- Allow control of the noCdn / no_cdn script parameters HOT 1
- Unauthorised when using `secrets.GITHUB_TOKEN`. Packages not pushed to Github Repository Packages when using PAT. HOT 9
- Add a possibility to specify the verbosity flag for the install-scripts execution HOT 1
- Support SDK workloads HOT 2
- Support explicit architecture for dotnet HOT 1
- Allow tools to cache
- NUGET_AUTH_TOKEN does not work for official NuGet repository HOT 8
- Docs Bug: v4 README points to v3 HOT 2
- Bitcoin HOT 1
- Infrequent "MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found" errors with ubuntu 24.04 hosted runner. HOT 7
- Installed version of .NET not respected. HOT 8
- Automatically auth package source mapping that match source-url HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-dotnet.