事緣
問題一
問題二
Soluation 解決方案
海豚最後明白了為什麼上手要winForm.csproj
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>XXX</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Reminder.WinForm</RootNamespace>
<AssemblyName>Reminder.WinForm</AssemblyName>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'UAT|AnyCPU'">
...
<ProductName>UAT.XRayReminder</ProductName>
<AssemblyName>Reminder.WinForm.UAT</AssemblyName>
</PropertyGroup>
海豚找到 以下應該可行
<StartAction>Program</StartAction>
<StartProgram>C:\Path\To\Your\External\EnterpriseApp.exe</StartProgram>
<StartArguments>/debugMode</StartArguments>
<StartWorkingDirectory>C:\Path\To\Your\External\</StartWorkingDirectory>
另外
海豚看bin / obj 內build 完的config 真的有attribute / element duplicated
只要將 Insert 改成 Replace / Update
Reference
Google AI
search
VS xdt:Locator="Match(name)"
Answer
xdt:Locator="Match(name)" is an XML Document Transform (XDT) directive used in Visual Studio to locate and manipulate specific elements within XML files (like web.config or app.config) during project builds or deployments. It instructs the transformation engine to find an element in the target file whose name attribute exactly matches the name attribute in your transform file.
Code Example
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes"
xdt:Locator="Match(name)" />
</connectionStrings>
</configuration>
https://learn.microsoft.com/en-us/previous-versions/aspnet/dd465326(v=vs.110)
https://www.youtube.com/watch?v=IpJOREDFTnY
https://jengting.blogspot.com/2020/10/VS-Configuration-Transform-AppConfig.html
Answer
When you pair this locator with a transformation attribute (such as xdt:Transform="SetAttributes" or xdt:Transform="Replace"), it modifies only the matched node. If multiple attributes are required for a precise match, they can be combined in a comma-delimited list (e.g., xdt:Locator="Match(name, providerName)").
https://www.zoeydc.com/Post/visual-studio-release-project-webconfig
Google AI
search
VS debug StartAction multiple
No comments:
Post a Comment