Debugging dll with....

In visual studio 2005 I was able to debug my control library with visual studio, there was a option startup executable in the debug tab in the project properties. But I can't find it in 2008. The only thing I see is the startup objects with an empty list. How can I debug my design time functionality for my controls? Thnx!
[331 byte] By [HawVer] at [2008-2-25]
# 1

Hi HawVer.

I just checked both C# Express 2005 and 2008 - both versions lack the ability to specify startup behavior for the project. So you've never been able to do this in C# Express, but the full Visual Studio certainly has this capability.

In your situation, you might consider creating a separate scratch pad project which C# Express can start. In that project you can use and test out the things from your class library. You might also consider creating a test project to house unit tests for this component you're building.

Hope this helps!

Scott Nonnenberg

ScottNonnenbergMSFT at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Visual C# Express Orcas...
# 2
Hi Scott,

Thanks for your information. It's indeed true that this functionality also did not exist in version 2005. I must have mixed up my version at my work and the version I have here at home.

Too bad I can't debug my desig time functionality in Visual Studio Express. But after all, you can't hardly expect the same as the full version. Wink

Jacob

HawVer at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Visual C# Express Orcas...
# 3
HawVer,

It is, in fact, supported (both VC# Express 2005, 2008 Beta 2), but does require some manual steps to be made. Suppose you have unit tests within a Visual Studio project or some other library you would like to debug. If the project file name is Tests.csproj and contains a library configuration, create a file Tests.csproj.user (put it to the same directory where your Test.csproj is) with the following content:


<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>[PATH TO EXE]\nunit.exe</StartProgram>
<StartArguments>[PATH TO DLL]Tests.dll</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>[PATH TO EXE]\nunit.exe</StartProgram>
<StartArguments>[PATH TO DLL]Tests.dll</StartArguments>

</PropertyGroup>
</Project>


Replace [PATH TO EXE] and [PATH TO DLL] with the correct values for your system. After re-opening your project with Visual Studio Express you are able to debug your tests by simply pressing F5.

Happy debugging!

gotcf.net at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Visual C# Express Orcas...

Visual Studio Orcas

Site Classified