0
在我的應用程序已經配置了跟蹤偵聽如下System.Diagnostics程序登錄問題+維克斯申請名稱變更
的 「HelloWorld」 是我的AssemblyName和命名空間
<system.diagnostics>
<sources>
<source name="DebugCategory" switchName="DebugSwitch" switchType="System.Diagnostics.SourceSwitch">
<listeners>
<remove name="Default"/>
<!-- Add the listeners below -->
<add name="LogFile"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add name="Console" type="System.Diagnostics.ConsoleTraceListener" initializeData="true"/>
<add name="LogFile" type="HelloWorld.Diagnostics.FileLogTraceListener, HelloWorld" initializeData="HelloWorld.log" traceOutputOptions="DateTime" cycle="Month"/>
</sharedListeners>
在使用WIX創建安裝程序時,在我的WIX文件中,我將使目標exe文件從「HelloWorld.exe」變爲「MyWorld.exe」如下
<Component Id="MyWorld.exe" Guid="*">
<File Id="MyWorld.exe" Name="MyWorld.exe"
DiskId="1" Source="HelloWorld.exe" />
<Shortcut Id="HelloWorld.menu.exe" Name="Hello world application" Directory="McnMenu" Advertise="yes" WorkingDirectory="INSTAL32LLOCATION" />
</Component>
由於在EXE更名,TraceListener的不創建一個日誌文件。
目標名稱應該是「Myworld.exe」,如果我恢復文件元素
<File Id="HelloWorld.exe" Name="HelloWorld.exe" />
它工作得很好
任何一個可以幫助我。
對我來說,構建一個文件作爲一個名稱並將其部署爲另一個名稱似乎是個竅門。 .NET程序集知道它們的文件名應該是什麼。 –