Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild Fails in ASP.NET Project Using .NET Core 6.0 When Using bundleconfig.json, but Clean and Build Succeed #59475

Open
vsfeedback opened this issue Dec 13, 2024 · 1 comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
In Visual Studio 2022, when attempting to rebuild an ASP.NET project that uses .NET Core 6.0 and bundleconfig.json, the rebuild process fails. However, performing a separate clean operation followed by a build works as expected. This behaviour suggests an issue with how Visual Studio handles the rebuild process in projects with bundleconfig.json.

Severity	Code	Description	Project	File	Line	Suppression State
Error (active)		System.InvalidOperationException: No file exists for the asset at either location 'wwwroot\bundle\js\<somefile>.js' or 'wwwroot\bundle\js\<somefile>.js'.
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.ComputeFingerprintAndIntegrity(String identity, String originalItemSpec)
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssets.Execute()	WorkFlow.Web	C:\Program Files\dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.targets	662

Steps to Reproduce:

  1. Open Visual Studio 2022 with an ASP.NET Core project targeting .NET Core 6.0.
  2. Include a bundleconfig.json file in the project for bundling and minification.
  3. Right-click the project in Solution Explorer and select Rebuild.

Expected Behaviour:
The rebuild operation should succeed without errors, just as performing a clean and build does.

Actual Behaviour:
The rebuild operation fails, often without clear explanation, while clean and build separately succeed.

Steps Tried to Resolve

  1. Verified that bundleconfig.json is properly configured and valid.
  2. Verified Visual Studio 2022 to the latest version (17.12.2).
  3. Reproduced the issue on multiple machines and projects.

Impact
This issue disrupts the development workflow, as the Rebuild operation is commonly used for ensuring a clean and complete build without manual intervention.

Thank you for addressing this issue. Please let me know if additional logs or project files are required for further investigation.


Original Comments

Feedback Bot on 12/2/2024, 04:00 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Dec 13, 2024
@dotnet-policy-service dotnet-policy-service bot added the Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. label Dec 13, 2024
@javiercn javiercn added the Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue label Dec 13, 2024
Copy link
Contributor

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.

@dotnet-policy-service dotnet-policy-service bot added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue
Projects
None yet
Development

No branches or pull requests

2 participants