Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nant scripts

Status
Not open for further replies.

dmsruthi

Programmer
Aug 17, 2005
19
US
Hi All,

I am really new to Nant scripts, I have created DLL(C# class library) which has some windows forms and lots of images.

I dont know how to link resources to DLL,

I would appreciate if anyone post the solution.


Thanks
 
Try something like this.
Code:
<csc target="library"
	 output="${CompileLocation}WayCool.dll"
	 debug="${debug}"
	 doc="${CompileLocation}WayCool.xml"
	 warnaserror="true"
	 warninglevel="4" >
	 <resources>
	 	 <include name="MyForm.resx" />
	 </resources>
	<sources>
		<include name="${CompileSource}*.cs" />
	</sources>
</csc>
Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
If you have a number of resources to embed you can use NAnt's wild card facility
Code:
    <resources>
        <include name="*.resx" />
    </resources>

    <!-- or even -->

    <resources>
        <include name="**.resx" />
    </resources>
You can also use the <solution> task, which is easier to use. I'm on a project with 3 solutions with about 11 projects. I use <solution> for the general get-latest-version-and build script that all the devlopers run when they arrive for the day, and explicit <csc> and <csc> tasks in my cut-a-new-release-and-deploy script.
 
Hi thanks for the reply:

Ive one more probs, I ve few imagelist's in my form, I am adding some images in design time,

I dont know how to add this image resources to my DLL

Thanks
 
Try starting a new thread with this topic so people know about it. You might also want to do a search, as I think the topic of embedding images/sounds into your assembly has been covered before.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top