Hello all,
I have a simple to reproduce but serious problem using response files to
build designtime cf.net assemblies.
In my vs.net solution, I have a very simple cf.net class library which
looks like this:
public class CF_TEST : Control
{
public CF_TEST() {}
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.FillRectangle(new SolidBrush(Color.Red),
this.ClientRectangle);
}
protected override void OnPaintBackground(PaintEventArgs e) {}
protected override void OnResize(EventArgs e)
{
base.OnResize (e);
this.Invalidate();
}
}
along with two MakeFile projects to build the designtime assembly. In the
Build/Rebuild All Command Line of the first MakeFile project I have the
following:
csc.exe /debug+ /noconfig /define:DESIGNATTRIBUTES /target:library
/out:"$(TargetPath)" "$(SolutionDir)CF_TEST.cs"
"$(SolutionDir)AssemblyInfo.cs"
/r:"$(VSInstallDir)CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Design.dll"
/r:"$(VSInstallDir)CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll"
/r:"$(VSInstallDir)CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:System.Windows.Forms.dll
/r:System.Drawing.dll /r:System.dll /r:System.XML.dll
/r:System.Web.Services.dll /r:System.Data.dll /nowarn:1595
This produces a designtime assembly which is visible in the toolbox of a
cf.net winform application and is draggable onto the same winform. In the
Build/Rebuild All Command Line of the second MakeFile I specify a response
file like this:
csc.exe @"$(ProjectDir)CF_TEST.rsp"
The response file itself contains the following:
/debug+ /define:DESIGNATTRIBUTES /target:library
/out:"C:\Test\C#\CF_TEST.DESIGN\CF_TEST.DESIGN.dll"
"C:\Test\C#\CF_TEST\CF_TEST.cs" "C:\Test\C#\CF_TEST\AssemblyInfo.cs"
/r:"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\System.CF.Design.dll"
/r:"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.dll" /r:"C:\Program Files\Microsoft
Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Drawing.dll" /r:"C:\Program Files\Microsoft Visual
Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\System.Windows.Forms.dll" /r:"C:\Program Files\Microsoft Visual Studio
.NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\System.Drawing.dll"
/r:"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\System.dll" /r:"C:\Program
Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\System.XML.dll" /r:"C:\Program
Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\System.Web.Services.dll"
/r:"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\System.Data.dll" /nowarn:1595
However, although the commandline arguments are identical to the first
makefile, this second makefile produces a designtime assembly which is not
visible in the toolbox of a cf.net winform application and is not draggable
onto the same winform. Using Reflector, I see that the only difference is in
the referenced assemblies; the designtime assembly created by the first
makefile references:
mscorlib
System.CF.Design
System.CF.Drawing
System.CF.Windows.Forms
whereas the designtime assembly created by the second makefile references:
mscorlib
System.CF.Design
System.Drawing
System.Windows.Forms
However I change the order of the commandline arguments in the response file
I cannot get the assembly to reference either System.CF.Drawing or
System.CF.Windows.Forms. The project I am working on has a large number of
source files and requires that a response file is used.
Any ideas please (I can send the solution which reproduces the problem if
necessary).
Many thanks,

Response files and referenced assemblies
ondy1985
csc.exe /debug+ /noconfig /target:library @"$(ProjectDir)CF_TEST.rsp" /r:"$(VSInstallDir)CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\System.CF.Design.dll" /r:"$(VSInstallDir)CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\System.CF.Windows.Forms.dll" /r:"$(VSInstallDir)CompactFrameworkSDK\v1.0.5000\Windows CE\Designer\System.CF.Drawing.dll" /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.dll /r:System.XML.dll /r:System.Web.Services.dll /r:System.Data.dll /nowarn:1595
CF_TEST.rsp contains the rest of the files needed by the project.
Vijay2kr
Is /noconfig missing from response file (or may be I just need new glasses)
EmilianoCapoccia