我试图在我的csproj文件中使用appdata,只有当其他开发人员在调试模式下运行时才将许可文件复制到appdata.
这是我在csproj文件的after build部分尝试的内容:
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<LicenseFile Include="..\..\..\..\utilities\FlexNet\Glass_Debug.lic"/>
</ItemGroup>
<Copy SourceFiles="@(LicenseFile)" DestinationFiles="@(LicenseFile->'$(%AppData%)\CompanyName\SeismicInterpretation\%(Filename)%(Extension)')" />
Run Code Online (Sandbox Code Playgroud)
我没有收到错误,项目构建和运行正常,除了它不会将许可证文件复制到我的appdata文件夹.
有任何想法吗?