English 中文(简体)
在视觉演播室,我如何在不建造项目的情况下对项目进行欺骗
原标题:In Visual Studio, how do I debug a project without building it

This is for Visual Studio 2008.

我有<代码>Tools Projects and SolutionsBuild and RunOn>,当时项目已过时,为,因为这是我通常想要的。 然而,有时(在我审查版本控制的历史版本时),我想绕过建筑过程。 是否有一个神奇的主线,它将凌驾整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整整的一步,因此我不必改变环境并重新加以改变?

最佳回答

请正确点击解决办法的名称和去 财产——和; 不动产——和; 配置,明确项目的结构核对箱。

问题回答

在VS2013年,正确点击<代码>solution -> Configuration Manager,并明确建立你的项目核对箱。

I found it convenient to create a new build configuration in order to do this. Right-click the solution in the Solution Explorer and choose Properties. From there, choose Configuration Properties / Configuration. Now choose Configuration Manager and create a new configuration as shown. You can create the build configuration as a copy of your Debug project:

“entergraph

随后,新闻<条码>OK,并转自该项目的所有旗帜:

“enterography

Visual Studio will have created a folder underneath the bin folder in the startup project with the name of the new configuration. Copy your pre-built files into there and run the new configuration.

I put the following function in my NuGet_profile.ps1:

function debugnobuild() {
    # temporarily disable build (same as Properties -> Configuration -> ..)
    $buildProjects = @($DTE.Solution.SolutionBuild.ActiveConfiguration.SolutionContexts |
    where ShouldBuild | foreach {
        $_.ShouldBuild = $false
        $_.ProjectName
    })
    try {
        # start debugging
        $DTE.Solution.SolutionBuild.Debug()
    }
    finally {
        # undo changes
        $DTE.Solution.SolutionBuild.ActiveConfiguration.SolutionContexts |
        where { $buildProjects -contains $_.ProjectName } | foreach {
            $_.ShouldBuild = $true
        }
    }
}

Then just call debugnobuild (or any name you prefer) in the Package Manager Console.

我做的是:在法典中打上了<条码>System.Diagnostics.Debugger.Launch()的行文,在VS中连续操作节目。





相关问题
building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

热门标签