Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly " ". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Azure Error

I faced this problem during development of application https://www.qfles.com

Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "PageOne.Dependency". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\QflesAdmin\QflesAdmin.csproj]



This Error I was facing when I was deploying the Code to Azure from GitHub.

Problem - Your Solution referring the dlls by HintPath like this.

 <Reference Include="PageOne.PD">
      <HintPath>..\PageOne.PD\bin\Debug\PageOne.PD.dll</HintPath>
    </Reference>
    <Reference Include="PageOne.Services">
      <HintPath>..\PageOne.Services\bin\Debug\PageOne.Services.dll</HintPath>
    </Reference>


Solution - It should not refer the dlls by hint Path. It should be like this.

<ItemGroup>
    <ProjectReference Include="..\PageOne.Core\PageOne.Core.csproj">
      <Project>{8DA1814E-3E51-4A88-A5F7-80345A7A7841}</Project>
      <Name>PageOne.Core</Name>
    </ProjectReference>
    <ProjectReference Include="..\PageOne.PD\PageOne.PD.csproj">
      <Project>{197492FB-2E97-4DB1-BCDB-83B6EBED3CE3}</Project>
      <Name>PageOne.PD</Name>
    </ProjectReference>
    <ProjectReference Include="..\PageOne.Services\PageOne.Services.csproj">
      <Project>{BC08A2FB-F043-4CA9-8146-1647D7AECFFE}</Project>
      <Name>PageOne.Services</Name>
    </ProjectReference>
  </ItemGroup>

Visual Studio do all these things automatically, do not add dlls manually to references. Use Auto resolve .


Thanks

Comments

Popular posts from this blog

Swagger for Azure functions: Undocumented TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. Fixed.

Fixed: The required column was not present in the results of a 'FromSql' operation in asp.net core EF core

Severity Code Description Project File Line Suppression State Error Unable to resolve dependencies. 'Xamarin.Android.Support.Design 24.2.1' is not compatible with 'Xamarin.Forms 2.3.3.180 constraint: Xamarin.Android.Support.Design (= 23.3.0)'. 0