Skip to content

Commit

Permalink
- Added Debug configuration suport to WinUSB to allow building Debug
Browse files Browse the repository at this point in the history
- Fixed VB project templates to set Optimized property to false in debug configurations to enable debugging
- Modified VSProject.cs to test for mscorlib as an explicit dependency and if not present, add it so that various versions of VS and MSBUild common project systems work correctly.
- Added optional flavor flag in build_sdk to allow building the SDK as Debug. This helps in debugging working with the VS integration in debug mode as it builds all the dependencies in one pass.
  • Loading branch information
smaillet-ms committed Feb 20, 2016
1 parent 80e605d commit 0f7b2ed
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
17 changes: 15 additions & 2 deletions Framework/CorDebug/VsProject.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Linq;
using System.Diagnostics;
using CorDebugInterop;
using System.Collections;
Expand Down Expand Up @@ -142,11 +143,24 @@ public string[] GetDependencies( bool fIncludeStartProgram, bool fPE, bool fTarg
AddDependencies( table, new string[] { this.m_startProgam } );
AddDependencies( table, this.m_startProgramReferences );
}
// if mscorlib isn't in the list of assemblies, add it as it's always required
// the build system in some versions of VS+MSBuild will assume that, while other
// versions will explicitly reference it with the InProject item property set to
// false so it won't show in the IDE. By testing for it and adding it if not found
// both cases are covered.
var q = from path in table.OfType<string>( )
where 0 == string.Compare( Path.GetFileName( path ), "mscorlib.dll", StringComparison.InvariantCultureIgnoreCase )
select path;
if( !q.Any())
{
PlatformInfo pi = new PlatformInfo(frameworkVersion);
AddDependencies( table, new string[] { Path.Combine( pi.FrameworkAssembliesPath, "mscorlib.dll" ) } );
}

ArrayList deps = new ArrayList( table.Values );

string[] depsArray = (string[])deps.ToArray( typeof( string ) );

if(fPE)
{
for(int iAssembly = 0; iAssembly < depsArray.Length; iAssembly++)
Expand All @@ -158,7 +172,6 @@ public string[] GetDependencies( bool fIncludeStartProgram, bool fPE, bool fTarg
return depsArray;
}


public string Assembly
{
set { this.m_assembly = value; }
Expand Down
7 changes: 6 additions & 1 deletion Framework/Debugger/WinUsb/WinUsb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
<SccProvider>SAK</SccProvider>
<OutDir>$(BUILD_TREE_SERVER)\DLL\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<RunCodeAnalysis>false</RunCodeAnalysis>
<CodeAnalysisRuleSet>Debugger.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>,DEBUG,TRACE,TINYCLR_BUILD_SERVER,TINYCLR_USESTRONGNAMES</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
Expand Down
8 changes: 5 additions & 3 deletions build_sdk.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if "%1" == "-?" goto :ShowUsage
if /i "%1" == "/h" goto :ShowUsage
if /i "%1" == "-h" goto :ShowUsage

if "%FLAVOR_SDK%" == "" FLAVOR_SDK=RTM

if /i "%VSSDK140Install%"=="" goto :MissingVSSDK
if NOT EXIST "%VSSDK140Install%" goto :MissingVSSDK

Expand All @@ -33,13 +35,13 @@ call setenv_vs.cmd 14
SET PORT_BUILD=

ECHO Building PreSDK ...
call Msbuild sdk.dirproj /nr:false /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=RTM /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=sdkpre.log
call Msbuild sdk.dirproj /nr:false /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=%FLAVOR_SDK% /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=sdkpre.log

ECHO Building SDK ...
call Msbuild setup\ProductSDK\Product.wixproj /m /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=RTM /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=sdk.log
call Msbuild setup\ProductSDK\Product.wixproj /m /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=%FLAVOR_SDK% /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=sdk.log

ECHO Building VSIX packages ...
call Msbuild setup\ProductSDK\VsixPackages.dirproj /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=RTM /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=vsixpkg.log
call Msbuild setup\ProductSDK\VsixPackages.dirproj /t:Build /p:BuildNumber=%BUILD_VERSION% /p:FLAVOR=%FLAVOR_SDK% /clp:verbosity=minimal /flp:verbosity=detailed;LogFile=vsixpkg.log

SET PORT_BUILD=

Expand Down

0 comments on commit 0f7b2ed

Please sign in to comment.