次のコマンドでプロジェクトをビルドできます...
csc /reference:lib\Newtonsoft.Json.dll SomeSourceFile.cs
...しかし、このコマンドを使用すると...
msbuild MyProject.csproj
... 次の .csproj ファイルには、.dll 参照が含まれていません。何かご意見は?
<PropertyGroup>
<AssemblyName>MyAssemblyName</AssemblyName>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="SomeSourceFile.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>lib\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="Build">
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
<Csc Sources="@(Compile)" OutputAssembly="$(OutputPath)$(AssemblyName).exe" />
</Target>