Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I publish my web app to a remote server, the XML of the RDLC report is lost and replaced with the following:

"This is a marker file generated by the precompilation tool, and should not be deleted!"

Depending on the Build Action selected, I will either get the file published with the above content or the file isn't published at all.

How do I publish my RDLC to the remote server without losing the XML? So far, the only way I've been able to do it is manually migrating the file.

What I have tried:

I have tried various Build Action and Copy to Output Directory combinations with no success.
Posted

1 solution

It sounds like you're publishing your site as precompiled and not updatable:
Precompiling Your Website (C#) | Microsoft Learn[^]

The compiler seems to think your RDLC file is a page to be compiled, so it gets compiled into the .dll, and the file is replaced with a marker.

According to this SO answer[^], you need to set the build action to "content", and remove the RDLC build provider from the web.config file:
XML
<buildProviders>
    <!-- Remove this: -->
    <add extension=".rdlc" type="..." />
</buildProviders>
 
Share this answer
 
Comments
StruggleBus 6-Mar-24 11:19am    
Thanks, that did the trick. I spent all day yesterday trying to figure this out. Your google-fu is stronger than mine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900