Reputation: 2783
I am trying to implement offline sync functionality in my Xamarin App. I have installed the Nuget packages:
I am receiving this error when I try to rebuild my application
Severity Code Description Project File Line Suppression State
Error CS0006 Metadata file '..\..\packages\AWSSDK.SecurityToken.3.3.2\analyzers\dotnet\cs\AWSSDK.SecurityToken.CodeAnalysis.dll' could not be found
Upvotes: 4
Views: 6465
Reputation: 96
For me, I had to unload the errant project and edit the .csproj to have the correct path like so:
<ItemGroup>
<Analyzer Include="..\packages\AWSSDK.S3.3.3.10\analyzers\dotnet\cs\AWSSDK.S3.CodeAnalysis.dll" />
</ItemGroup>
Upvotes: 8
Reputation: 1601
I believe the problem is that the default AWS template that gets installed via the AWSToolkitPackage.vsix creates a reference to the code analyzer dll's as though a separate directory was created for the solution.
The simple fix is to eliminate one of the dots from where the file system references the NuGet package. I didn't have to close the solution or anything, simply open up the affected project file (likely *.csproj) in your favorite text editor and find the package reference.
Bad:
..\packages\AWSSDK.EC2.3.3.19\analyzers\dotnet\cs\AWSSDK.EC2.CodeAnalysis.dll
Works for me:
.\packages\AWSSDK.EC2.3.3.19\analyzers\dotnet\cs\AWSSDK.EC2.CodeAnalysis.dll
In my case there were three separate packages that needed to have their paths corrected. Note that once I upgraded to the latest versions of "awssdk" NuGet packages the analyzers themselves were removed from the project's reference.
That makes me think the alternate solution is to simply update all the NuGet package references and don't worry about editing the csproj file.
Upvotes: 1