Content Pipeline not reflecting changes to file

I have a well established project I’ve been developing for several years now.
But recently when I go to edit a file the Monogame pipeline tool, changes made to the files in the content folder are not updated when the game is launched. In order to successfully make changes to a file that are reflected in game I have to change the file in the bin folder of the project. I can even delete files from the content folder but the project still runs.
Also, if I delete the bin folder and reload the content from the tool, the files that are replaced are old versions that have edit dates of last year (last time I made substantial edits to those files).
What is causing this? How can I fix this?

Can you show what your csproj looks like?

Here is the csproj file

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <PublishReadyToRun>false</PublishReadyToRun>
    <TieredCompilation>false</TieredCompilation>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <ApplicationIcon>Icon.ico</ApplicationIcon>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <Optimize>False</Optimize>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <Optimize>True</Optimize>
  </PropertyGroup>
  <ItemGroup>
    <None Remove="Icon.ico" />
    <None Remove="Icon.bmp" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Icon.ico" />
    <EmbeddedResource Include="Icon.bmp" />
  </ItemGroup>
  <ItemGroup>
    <MonoGameContentReference Include="Content\Content.mgcb" />
  </ItemGroup>
  <ItemGroup>
    <TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="MonoGame.Extended" Version="3.8.0" />
    <PackageReference Include="MonoGame.Extended.Graphics" Version="3.8.0" />
    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\NPCDialogue\NPCDialogue\NPCDialogue.csproj" />
  </ItemGroup>
</Project>

make sure you go through all lthe steps… a legacy project is really hard to update… it was worth it in my case to use net 7 and teh super JIT optimizer even if it took 5 weeks to get off from netstandard2 to net 6/7 … you have to chose the mg 3.8.1 brach in the 2 samples that work, but are not ideal for supporing both mobile and PCs. but they work.

https://docs.monogame.net/articles/samples.html

are you on windows or mac when you build? some pepole just give up and build the xnb and stick them somewhere they give up but is works and its no repeat code…

i did make a half decent sample :

its currently broken as im putting in basic shader tests, but the Net7 branch ( not the default ) if you clone that you can build at least desktop dx and window should run and deploy on mac, linux ,I tested only droid and pc GL and pc DX.

if you touch the clipshader.fx in the MGcore, content, and just ctrl f5 you will see a new result in secs , on GL and DX… under dev studio 2022 on windows… just pick a startup project besides iOS and build and run.

like change this :
return float4(1, 0, .1f, 0.7);
// return float4(0, 0, 0, 0);// transparent.
}

if this isnt how you want to setup ( using a shared gamecore) … then be sure…
unistall netcore 3.1… install teh content builder tool via command line if you use that, i edit it with notepad.

check if you can build and run neonshooter and the other sample thats been updated, problem with that one is a link to each asset must be maintained for androind and i dont know why… i had to just off trimming and AOT and i actually dont want AOT because of the net JITer is doing intrinsics for you, wiht SIMD and two pass JITTING based on the way the code is covered.

in my shader / render target test rig, i can touch an fx file and build EXE from ios, android , exe GL and exe DL all on one solution … with net 7 wich is ridiculousy fast if you know who to make a good game loop and custom timers can can get a steady rate with lots of heavy physics and AI if yhou need.

at the root ust be a folder says .config wiht this dotnet-tools.json
{
“version”: 1,
“isRoot”: true,
“tools”: {
“dotnet-mgcb”: {
“version”: “3.8.1.303”,
“commands”: [
“mgcb”
]
},
“dotnet-mgcb-editor”: {
“version”: “3.8.1.303”,
“commands”: [
“mgcb-editor”
]
},
“dotnet-mgcb-editor-linux”: {
“version”: “3.8.1.303”,
“commands”: [
“mgcb-editor-linux”
]
},
“dotnet-mgcb-editor-windows”: {
“version”: “3.8.1.303”,
“commands”: [
“mgcb-editor-windows”
]
},
“dotnet-mgcb-editor-mac”: {
“version”: “3.8.1.303”,
“commands”: [
“mgcb-editor-mac”
]
}
}
}
if it still fails there are bugs in devstudio especially if you downgrades then updgrate back to 3.8.1 it might use cache files.
you might have to look for cache files in your user folders that dev studio leaves behind… search by date for anything that looks like dev studio placed it … jus in hyour user folder ( CAREFUlly) … this shouild not break your install… it does that to speed up builds, but it mgiht give you weird issues of deja vu…

I discovered that the files in question were marked as Build Action “Copy” in the Pipeline tool, but when selected from the Content file in the VS solution explorer, they were somehow erroneously listed as “Build Action - None” and “Copy to Output Directory - Do not copy”, so it seems that their changes were not being copied on build. This fixed this problem.
Thanks!