资源描述:
《c#中csc命令的用法(国外英语资料)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、c#中csc命令的用法TheuseofCSCcommandsinc#Csc.exehasmanyparametersandswitchoptionswhencompilingtheVisualc#programcodeintoILfiles.ProperunderstandinganduseoftheseparametersandswitchescansometimesbesolvedAfewseeminglyintractableproblems.Hereisalistofthespecificfunctionsoftheseparametersandswitches.Th
2、eseparametersandswitchoptionsarefollowedAlphabeticalorder.The"*"isacommonlyusedparameterorswitch.///////////////////////////////////////////////////////////////////////////////ThecommandlinesampleCompileFile.Cstoproducefile.exe:CSCFile.CsCompileFile.Cstoproducefile.dll:CSC/target:libraryFil
3、e.CsCompileFile.CsandcreateMy.exe:CSC/out:my.exeFileCompileallthec#filesinthecurrentdirectorybyusingtheoptimizationanddefinitionoftheDEBUGsymbol.Theoutputisfile2.exe:CSC/define:DEBUG/optimize/out:file2.exe*.csCompileallthec#filesinthecurrentdirectorytoproduceadebugversionofthefile2.dll.Nolo
4、goandwarning:CSC/target:library/out:file2.dll/warn:0/nologo/debug*.csCompileallthec#filesinthecurrentdirectoryasSomething.Xyz(aDLL):CSC/target:library/out:Something///////////////////////////////////////////////////////////////////////////////Whenyou'redoingapage,you'regoingtousetabscript,a
5、ndrememberthatInternetexplorerWebControlseemstohave,lookforitontheweb.ItturnsoutthatMicrosoftdoesn'tsupportthisControls,andnodownloads...Ican'thelpit.IhavetoaskGoogleforhelp.Itwassoonfound.Runbuild.bataftertheinstallationCopytheruntimefilesandnoDLLfiles...Here'salookatbuild.bat:If"%_echo%"=
6、=""echooffIfnotexistbuildmkdirbuildCsc.exe/out:buildMicrosoft.Web.dllXcopySRCRuntimebuildRuntime/E/Y/I/QNoticetheredone,it'susingthecsc.exe,whichdoesn'twritetheabsolutepath.ButmyPATHwasneverregistered.toC:Windows,Windows,Windows,Windows,Windows,Windows,andWindows@IEWebControls.RSPThat'si
7、t,butthere'sawarning:SRCtreeview.cs(119313):warningCS0618:Thesystem.xml.xsl.xsl.xpathnavigator,system.xml.xsl.XsltArgumentList,'isobsolete:'YoushouldpasstheXmlResolvertoTransform()method'Well,Idon'tcareaboutit,Icanuseit.Becauseyouwanttoputitontheserver,