我正在使用MSBuild.exe构建安装脚本。我有3个Nuget软件包,脚本应该将其还原,但是它忽略了它们,我不知道为什么。
这是我用于MSBuild的XML代码
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Start"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceFolder>..\myfolder</SourceFolder>
</PropertyGroup>
<Target Name="Start">
<CallTarget Targets="Build"/>
</Target>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.8.1" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>
<Target Name="Build">
<MSBuild
Projects="$(SourceFolder)\mysolution.sln"
Properties="Configuration=Release"
Targets="Restore;Clean;Build"
ContinueOnError="false"
StopOnFirstFailure="true"
>
</MSBuild>
</Target>
</Project>
谢谢。