.NET Framework3.5ã®ãªãªã¼ã¹ã¨å
±ã«MSBuildããã¼ã¸ã§ã³ãä¸ãã£ã¦ãã¾ãã
ãã®éã«ãä»ã¾ã§ã®csprojãã¡ã¤ã«ã ã¨C#3.0ç¨ã®cscã³ã³ãã¤ã©ã使ç¨ããã¾ããã
C#3.0ã®ã³ã¼ããã³ã³ãã¤ã«ããã«ã¯ãæ¢åã®ãã«ããã¡ã¤ã«ã®ä»¥ä¸ã®ç¹ãå¤æ´ãã¾ãã
- projectè¦ç´ ã«ToolsVersionå±æ§ã追å ããã
- å¤ã¯ã3.5ãæå®ãã¾ãã
- ããããã£TargetFrameworkVersionã追å ããã
- å¤ã¯ãv3.5ãæå®ãã¾ãã
- Framework3.5ã§è¿½å ãããDLLã«é¢ãã¦ã¯ãReferenceæå®ã®éã«RequiredTargetFrameworkè¦ç´ ãåè¦ç´ ã¨ãã¦æå®ããã
- å¤ã¯ã3.5ãæå®ãã¾ãã
- å ±éã¿ã¼ã²ãããã¡ã¤ã«ãã¤ã³ãã¼ããã¦ããå ´åã¯($MSBuildBinPath)ã$(MSBuildToolsPath)ã«å¤æ´ããã
- WinFxç¨ã®å ±éã¿ã¼ã²ãããã¡ã¤ã«ã¯ãMicrosoft.Commons.targetså ã«ã¦èªåçã«ãã¼ã¸ã§ã³ãè¦ã¦èªã¿è¾¼ã¾ããã®ã§ãããªãã
ããã§ã¨ãããããã«ãã§ããããã«ãªãã¾ãã
以ä¸ããµã³ãã«ãã«ããã¡ã¤ã«ã§ãã
<?xml version="1.0" encoding="utf-8"?> <!-- vim:set ts=4 sw=4 et ws is nowrap ft=xml: --> <!-- ãµã³ãã«ããã¸ã§ã¯ãç¨ãã«ããã¡ã¤ã« å ±éã¿ã¼ã²ãããã¡ã¤ã«ã¯ã以ä¸ã®å ´æã«ããã ${.net frameworkã¤ã³ã¹ãã¼ã«ãã©ã«ã}ã®ä¸ vimããå©ç¨ããå ´åã¯ã以ä¸ã®ããã«ãã¦å®è¡ããã :!msbuild /t:Build,Run /p:TargetClass=ã¯ã©ã¹å ä½æãããEXEãã¡ã¤ã«ã¯ä»¥ä¸ã®ããã«ãã¦å®è¡ããäºãåºæ¥ãã $ GsfSamples.exe Gsf.Samples.Tmp.対象ã¯ã©ã¹å --> <!-- å©ç¨ãããã¼ã«ãã¼ã¸ã§ã³ã¯3.5ã®ãã®ãå©ç¨ããããè¨å®. --> <Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!-- å ±éããããã£ã®è¨å®. --> <PropertyGroup> <!-- ã¢ã»ã³ããªå --> <AssemblyName>GsfSamples</AssemblyName> <!-- åºåå½¢å¼ --> <OutputType>winexe</OutputType> <!-- ã«ã¼ãåå空é --> <RootNamespace>Gsf.Samples.Tmp</RootNamespace> <!-- æä½éè¦æ±ããã.NET Frameworkã®ãã¼ã¸ã§ã³ --> <MinFrameworkVersionRequired>2.0</MinFrameworkVersionRequired> <!-- ã¿ã¼ã²ããã¨ãã.NET Frameworkã®ãã¼ã¸ã§ã³ --> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <!-- ãããã°ã¿ã¤ã --> <DebugType>full</DebugType> <!-- ã·ã³ãã«ã®å®ç¾© --> <DefineConstants>DEBUG;TRACE;GSF</DefineConstants> </PropertyGroup> <!-- å®è¡ããã¨ã³ããªãã¤ã³ãã¯ã©ã¹ã®æå® TargetClassããããã£ã¯ãã³ãã³ãã©ã¤ã³ãã渡ãããã æå®ããã¦ããªãå ´åã¯ãæ¢å®ã®ããã¼ã¯ã©ã¹ã使ç¨ããã --> <PropertyGroup> <TargetClass>DummyClass</TargetClass> </PropertyGroup> <!-- Runã¿ã¼ã²ããå ã«ã¦ä½¿ç¨ããã¦ããããããã£ã®è¨å®. --> <PropertyGroup> <!-- å®è¡æã®å¼æ° --> <StartArguments>$(RootNamespace).$(TargetClass)</StartArguments> <!-- ã¢ããªã±ã¼ã·ã§ã³å ã§ã®ä½æ¥ãã£ã¬ã¯ã㪠--> <StartWorkingDirectory></StartWorkingDirectory> </PropertyGroup> <!-- ã³ã³ãã¤ã«ç³»ã®ã¿ã¼ã²ããã«ã¦å©ç¨ããã¦ããé ç®ã®è¨å®. --> <ItemGroup> <!-- åç §è¨å®. --> <Reference Include="System"/> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data"/> <Reference Include="System.Data.DataSetExtensions"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Drawing"/> <Reference Include="System.Drawing"/> <Reference Include="System.Transactions"/> <Reference Include="System.Windows.Forms"/> <Reference Include="System.Xml"/> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="PresentationCore"/> <Reference Include="PresentationFramework"/> <Reference Include="WindowsBase"/> </ItemGroup> <ItemGroup> <!-- ã³ã³ãã¤ã«å¯¾è±¡. --> <Compile Include="*.cs"/> </ItemGroup> <!--=====================================================================--> <!-- å ±éã¿ã¼ã²ãããã¡ã¤ã«ã®èªã¿è¾¼ã¿. --> <!--=====================================================================--> <!-- 以ä¸v3.5ç¨ã®è¨å®. --> <!-- C#ç¨ã®å ±éã¿ã¼ã²ããå®ç¾©ãã¡ã¤ã«.(å é¨ã§Commonå®ç¾©ãã¡ã¤ã«ãèªã¿è¾¼ã¾ãã¦ãã.) --> <!-- åæã«TargetFrameworkVersionã®å¤ã3.0以ä¸ã®å ´åã¯WinFXç¨ã®å ±éã¿ã¼ã²ããå®ç¾©ãã¡ã¤ã«ãèªã¿è¾¼ã¾ãã. --> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- 以ä¸v2.0ç¨ã®è¨å®. --> <!-- C#ç¨ã®å ±éã¿ã¼ã²ããå®ç¾©ãã¡ã¤ã«.(å é¨ã§Commonå®ç¾©ãã¡ã¤ã«ãèªã¿è¾¼ã¾ãã¦ãã.) --> <!--<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />--> <!-- WinFXç¨ã®å ±éã¿ã¼ã²ããå®ç¾©ãã¡ã¤ã«. --> <!--<Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" /> --> </Project>
ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼
éå»ã®è¨äºã«ã¤ãã¦ã¯ã以ä¸ã®ãã¼ã¸ãããåç
§ä¸ããã
- ããããåå¿é²æ¥è¨ã¾ã¨ã
ãµã³ãã«ã³ã¼ãã¯ã以ä¸ã®å ´æã§å ¬éãã¦ãã¾ãã
- ããããåå¿é²æ¥è¨ãµã³ãã«ã½ã¼ã¹ç½®ãå ´