C# is loading Outdated File

Started by
1 comment, last by Navyman 7 years, 5 months ago

i have a curious Problem...

I try to read a File with:

StreamReader r = new StreamReader("Content//spriteShader.fx");

It's a simple HLSL Shader File.

So i write "return float4(1,0,1,1);" in the .fx file. I compile, run, everything is output well in the Console.

Now i change the .fx file to "return float4(1,1,1,1);" i save and run the Program but the Output is still the old one "return float4(1,0,1,1);"!

I look in the Build Folder an here i see ne newer File!

So my Question is: why Streamreader is loading the Outdated File when in the Build folder is always the newer file ( this work!).

The Solution is a Class Library not a Windows Application if this helps. Anybody have an idea?

EDIT: when i make a space in the .cs file or another change and save the .cs File again, the newer file is loading!

BuildAction: Compile Copy: Do not copy ( when i switch to Copy Always the problem is the same )

Advertisement

Solved, i must save the .fx file in the .dll.

I added a Resource to my Solution now it works!

Very cool that you continued to work away and found a solution. :)

Developer with a bit of Kickstarter and business experience.

YouTube Channel: Hostile Viking Studio
Twitter: @Precursors_Dawn

This topic is closed to new replies.

Advertisement