简体   繁体   English

引用的项目的pdb文件不在此项目应用程序文件列表中

[英]A referenced project's pdb file not in this projects application files list

I have a C# WPF solution that contains three projects, MyApp, MyAppAdmin and MyAppLibrary. 我有一个C#WPF解决方案,其中包含三个项目:MyApp,MyAppAdmin和MyAppLibrary。 MyAppLibrary is referenced by the other two. MyAppLibrary被其他两个引用。

I need to be able to include MyAppLibrary.pdb when I publish MyApp (click once) but it does not show up in the projects Application Files even with "Show all files" checked. 发布MyApp(单击一次)时,我需要能够包含MyAppLibrary.pdb,但即使选中了“显示所有文件”,它也不会显示在项目“应用程序文件”中。

If I open the Application Files for MyAppAdmin and have Show all files checked MyAppLibrary.pdb is in the list. 如果我打开MyAppAdmin的应用程序文件并选中“显示所有文件”,则MyAppLibrary.pdb在列表中。

Any idea as to why the difference and/or how I can get it into the list for MyApp? 关于为什么差异和/或如何将其放入MyApp列表的任何想法?

Thanks, Dave 谢谢戴夫

You didn't say what type of projects you have, so I can't confirm that this will work for you. 您没有说您拥有什么类型的项目,所以我无法确认这对您有用。 If you have a web project, then you should be able to uncheck the Exclude generated debug symbols option on the Publish Web property page in Visual Studio. 如果您有一个Web项目,则应该能够在Visual Studio的“ 发布Web”属性页上取消选中“ 排除生成的调试符号”选项。

Failing that, you can try to set that value directly in the project file. 如果失败,则可以尝试直接在项目文件中设置该值。 Right click your project file in a Windows Explorer window and edit in a text editor. 在Windows资源管理器窗口中右键单击您的项目文件,然后在文本编辑器中进行编辑。 You can add a new PropertyGroup with this value to the end of the file (within the Project element) like this: 您可以将具有此值的新PropertyGroup添加到文件的末尾(在Project元素内),如下所示:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" 
  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  ...
  <PropertyGroup>
    <ExcludeGeneratedDebugSymbol>False</ExcludeGeneratedDebugSymbol>
  <PropertyGroup>
</Project>

It looks like this issue is related to what solution platform is used. 看来此问题与所使用的解决方案平台有关。 We need to run the application in 32 bit mode due to some dependancies we have. 由于存在某些依赖性,我们需要在32位模式下运行该应用程序。 When this was originally setup we created a custom solution platform for some reason where MyAppLibrary and MyAppAdmin used the Any CPU platform but MyApp used x86. 最初设置时,出于某种原因,我们创建了一个自定义解决方案平台,其中MyAppLibrary和MyAppAdmin使用Any CPU平台,而MyApp使用x86。 I switced to using the Any CPU for all of them and then specifying in each project to target the x86 platform. 我嘲笑对所有这些都使用Any CPU,然后在每个项目中指定以x86平台为目标。

Once this was done I know can see and include MyLibrary.pdb in the published output. 完成此操作后,我知道可以看到MyLibrary.pdb并将其包含在已发布的输出中。

Dave 戴夫

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM