Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
231 views
in Technique[技术] by (71.8m points)

c# - Unable to debug VSIX project

I'm trying to develop my first visual studio extensions project, I have VS10 SDK installed and was able to create a new project and can build it fine, however when I attempt to debug symbols are not loaded. I know that I can debug to VSIX project since I have downloaded a sample project online and it symbols are loaded and break points are being hit fine http://weshackett.com/2009/11/configure-vsix-project-to-enable-debugging/). So must be something specifically to do with the way I have created the VSIX project ( maybe !). One thing I do notice is that the dll and files aren't being copied over to the local "Application Data" area, only the manifest is being copied over, while for the sample project, all files are being copied over including the dll. I have compared project settings between both and they are both the same. I hope it makes sense, if I can provide any more detail then let me know...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

OK I managed to get it working. In order to do so, I had to unload the vsix project and edit the file as an XML document.

Either remove the following lines from the project file:

<IncludeAssemblyInVSIXContainer>
    false
</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>
    false
</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>
    false
</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>
    false
</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>
    false
</CopyOutputSymbolsToOutputDirectory>

or set them to true:

<IncludeAssemblyInVSIXContainer>
    true
</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>
    true
</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>
    true
</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>
    true
</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>
    true
</CopyOutputSymbolsToOutputDirectory>

or add them under the ... node if they don't exist.

Once I removed these lines and rebuilt the solution, the dll and pdb were copied now as expected to the bindebug folder as well as to the "AppDataLocalMicrosoftVisualStudio10.0ExpExtensions" folder.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...