question

PaulinL-2368 avatar image
0 Votes"
PaulinL-2368 asked PaulinL-2368 commented

Is File.Exists(networkpath) is takes more time to execute in click once application compared to debug version ?

I am executing File.Exists("//xxx//fs.txt") from visual studio debug version. It runs in +-1s. But same takes more than 7s when executed from a click once published application. Does anybody know why this is happening ?

dotnet-csharp
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Does this happen on the same computer?

0 Votes 0 ·

Yes. It happens on the same computer.

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered PaulinL-2368 commented

Hi PaulinL-2368,
According to my understanding, the native image generator (Ngen.exe) is used on the application. Using Ngen.exe means to achieve more disk access by reducing CPU consumption. And to use Ngen.exe, there is no need to load the JIT compiler (mscorjit.dll). But ClickOnce application deployment does not support Ngen. So this may be the reason why the click once application takes more time.
Here is a related document you can refer to.
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@DanielZhang-MSFT Is there a workaround to solve this issue or can you suggest some other installer which solves this issue ?

0 Votes 0 ·

Found the answer in the document you shared. Thank you.

0 Votes 0 ·