0

I am pushing changes to my .net8 application on Azure using Github Actions. The build and deploy stages are both completed successfully. But there are no changes to the site html of the site. It is as if the server cache needs to be invalidated.

  • I cleared my local browser cache, and
  • I have restarted the site on Azure.
  • I am using a basic tier with no staging environment.
  • I am not publishing to a slot. I really don't know why my changes haven't taken. They are committed in my source code.

My repo is here: https://github.com/SteveScott/Exposure-Computer-ASP/tree/master

My website is https://www.camexcalc.com

Edit: I made extensive changes by removing setup.cs and merging it with program.cs to make it the modern .net v8 style. However, even though the site compiles and runs locally, and deploys successfully, the changes are not reflected on the web even after clearing browser cache and restarting the server.

9
  • Try using Kudu to verify the timestamp of your files https://camexcalc.scm.azurewebsites.com. If they match up with the build/deploy time then GH is good. You can restart the app in kudu->command prompt: wmic process where "name='w3wp.exe'" delete for windows, killall -9 dotnet for Linux app service plans. Commented May 7, 2024 at 4:07
  • Do you see anything suspicious in the logs (camexcalc.scm.azurewebsites.net/api/deployments/…)? Commented May 7, 2024 at 5:05
  • @Steve Scott Is This Working locally? Commented May 7, 2024 at 6:35
  • @Aslesha it is not working locally. I get a page that says it can't start .net core Commented May 7, 2024 at 17:10
  • @azeem it says "Deployment Successful" Commented May 7, 2024 at 17:13

1 Answer 1

0

I was getting the warning 'Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllers(IServiceCollection)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. MVC does not currently support trimming or native AOT. https://aka.ms/aspnet/trimming

I was publishing to Windows so I did not neet Aot. I disabled native AOT and Trimming.

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    ...
    <PublishAot>false</PublishAot>
    <PublishTrimmed>false</PublishTrimmed>
 ...
</Project>

Sure enough, the trimming was causing the project to break. By disabling AOT and trimming for the Windows server, the changes were reflected to the site.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.