私はVisual Studio 2015を使用しています.2つの異なるWebアプリケーションを使用したソリューションがあります。 1つのソリューションとその下に2つのプロジェクトが存在します。ナゲットに関連するファイルは次のように配布されます。nugget.configとナゲット:パッケージフォルダが VSTS継続的インテグレーション:このコンピュータにNuGetパッケージがありません
各プロジェクトディレクトリにソリューションディレクトリにPackage.config
- 何ナゲットフォルダはありません。私の解決策にexe。
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see The missing file is ..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props.
マイプロジェクトのビルドおよびVisual Studioで正常に動作が、私は問題に直面しています
これはMyProject.csprojファイルです:
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" /> <Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{BBD26A49-D1F4-4391-9D60-2469433DEE0D}</ProjectGuid> <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AdminUI</RootNamespace> <AssemblyName>AdminUI</AssemblyName> <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <MvcBuildViews>false</MvcBuildViews> <UseIISExpress>true</UseIISExpress> <IISExpressSSLPort /> <IISExpressAnonymousAuthentication /> <IISExpressWindowsAuthentication /> <IISExpressUseClassicPipelineMode /> <UseGlobalApplicationHostFile /> <SccProjectName>SAK</SccProjectName> <SccLocalPath>SAK</SccLocalPath> <SccAuxPath>SAK</SccAuxPath> <SccProvider>SAK</SccProvider> <NuGetPackageImportStamp> </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
私はそれだけでエラーが発生したパッケージをインポートしようとしていることに気づいたが、それが明示的に他のパッケージをインポートしませんが、それは参照としてそれらを含める:
<Reference Include="WebGrease"> <Private>True</Private> <HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath> </Reference> <Reference Include="Antlr3.Runtime"> <Private>True</Private> <HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath> </Reference>
これもmyProject.csprojファイルの末尾:
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" /> <Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" /> </Target>
それは、このエラーを与える、なぜ私が疑問に思って、は「ナゲットがインストール」。なぜそれを見つけることができないのですか?私はこの問題に多くの時間を費やしました!
私は両方を試みましたが、異なるエラーを生成しました。このエラーは、インストールを指定したときに発生します。このタスクの「ソリューションへのパス」はプロジェクトディレクトリの「packages.config」を指しています。 – Coding
「Path to solution or packages.config」に**/*。slnを追加して、「Path to NuGet.config」を空のままにすることをお勧めします。 – Peter