Skip to content

How to find your temporary executing assemblies location

Updated: at 11:17 PM

Seems, I keep forgetting where the temporary files uses. The reason it's nice to know is sometimes you may want to open them with Reflector to see the generated code.  Also, sometimes, you want to delete those files because is confused and is reusing old ones.  So, here is the magic lines of code you need.

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
        LabelWhere.Text = System.Reflection.Assembly.GetExecutingAssembly().Location.ToString();
<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <asp:Label ID="LabelWhere" runat="server" Text="Label"></asp:Label>

Hope this Helps!