【发布时间】:2011-12-11 00:00:21
【问题描述】:
嗯,问题是我没有安装 Visual Studio,我也不想安装它,所以,我制作了一个批处理文件来编译我的 .csproj 文件和我的所有源文件。
问题是我不知道如何包含 .dll 文件。这是我的 .csproj 文件的当前代码:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyName>Project</AssemblyName>
<OutputPath>Bin\</OutputPath>
</PropertyGroup>
<ItemGroup>
<!-- .cs files -->
<Compile Include="program.cs" />
</ItemGroup>
<Target Name="Build">
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
<Csc Sources="@(Compile)" OutputAssembly="$(OutputPath)$(AssemblyName).exe" />
</Target>
</Project>
要在编译过程中包含/引用 dll 文件需要进行哪些更改?
【问题讨论】:
标签: c# c#-4.0 msbuild compilation csproj