简体   繁体   English

使用VS Express调试CodeDomProvider.CompileAssemblyFromFile生成的C#DLL

[英]Debug C# DLL generated by CodeDomProvider.CompileAssemblyFromFile using VS Express

I have a C# Windows Form myApp.exe program that at run time can compile another C# file, helloWorld, and execute it using reflection method. 我有一个C#Windows Form myApp.exe程序,该程序在运行时可以编译另一个C#文件helloWorld,并使用反射方法执行它。 I use the .NET CodeDomProvider.CompileAssemblyFromFile method in myApp to compile helloWorld into helloWorld.dll. 我在myApp中使用.NET CodeDomProvider.CompileAssemblyFromFile方法将helloWorld编译为helloWorld.dll。

Is there a way I can debug the helloWorld.cs/dll (set breakpoint, singlestepping) using VS Express. 有没有一种方法可以使用VS Express调试helloWorld.cs / dll(设置断点,单步执行)。 If not, is there a way I can debug (singlestepping or thru setting breakpoint) helloWorld within myApp.exe using some defined .NET methods? 如果没有,是否可以使用某些已定义的.NET方法在myApp.exe中调试(单步执行或通过设置断点)helloWorld? Thank you in advance! 先感谢您!

you can set 你可以设置

parameters.IncludeDebugInformation = true;
parameters.CompilerOptions += " /debug:pdbonly";

where parameters is CompilerParameters then you can debug normally 其中parameters is CompilerParameters则可以正常调试

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

相关问题 如何在C#中将声明式与CodeDomProvider一起使用? - How to include using declaratives with CodeDomProvider in c#? 将 C# 6 功能与 CodeDomProvider (Roslyn) 结合使用 - Using C# 6 features with CodeDomProvider (Roslyn) 如何调试vs vc6 / vba app调用的2008 c#express dll? - How to debug vs 2008 c# express dll which is called by a vb6/vba app? CompileAssemblyFromFile c# 属性 7.2 失败 - CompileAssemblyFromFile c# attribute 7.2 failed 使用CodeDomProvider在调试模式下编译源代码 - Compiling source code in debug mode using a CodeDomProvider 可以释放使用 CodeDomProvider 生成的程序集吗? - Can an assembly generated using CodeDomProvider be deallocated? 通过复制可执行文件和.dll文件进行部署的缺点(C#与Express)? - Disadvantages of deploying by copying the excutable and .dll files (c# vs express)? 如何在 Wine 上的 VS 2008 Express 中调试 C# WinForms 应用程序? - How to debug C# WinForms application in VS 2008 Express on Wine? 被只能在VS2013上运行的LightSwitch项目占用时,使用C#7.0调试dll并从VS 2017构建 - Debug a dll using C# 7.0 and build from VS 2017 when consumed by a LightSwitch project that can only run on VS2013 C#编译器使用CodeDomProvider的详细输出 - C# compiler verbose output with CodeDomProvider
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM