当前位置: 动力学知识库 > 问答 > 编程问答 >

clickonce - How do I control what appears in the the 'Application Files...' dialog in Visual Studio 2008?

问题描述:

I've been using ClickOnce on Visual Studio 2008 SP1 for a while without incident. But I recently changed my dev environment and my .csproj file has now lost the list of files I need to deploy.

The 'Application Files...' dialog now contains none of the dependencies that my application needs to run, just the assembly itself.

Has anyone seen this issue before?

Thanks in advance,

Jan

网友答案:

You should be able to repair the list by looking at the old csproj in your source control system - in particular, look at <PublishFile> entries, such as (for a trivial test):

  <ItemGroup>
    <PublishFile Include="TextFile1.txt">
      <Visible>False</Visible>
      <Group>
      </Group>
      <TargetPath>
      </TargetPath>
      <PublishState>Include</PublishState>
      <IncludeHash>True</IncludeHash>
      <FileType>File</FileType>
    </PublishFile>
  </ItemGroup>

Note that it may only have these records for explicit entries - if the files are being implicitly published they won't appear in the csproj.

Just edit the csproj file as xml and repair / replace any broken entries using your old (working) csproj as the template.

分享给朋友:
您可能感兴趣的文章:
随机阅读: