Esri / arcgis-maps-sdk-dotnet-samples

Sample code for ArcGIS Maps SDK for .NET – WPF, WinUI, .NET MAUI
Apache License 2.0
410 stars 518 forks source link

ArcGISRuntime.WPF.Viewer Missing ~\WPF\debug\ArcGISRuntime.WPF.Samples.dll #225

Closed SierraMultimedia closed 7 years ago

SierraMultimedia commented 7 years ago

On Win 7 x64 in VS13, initial build yielded the following error.

Error 2 Metadata file '~\arcgis-runtime-samples-dotnet-master\output\WPF\debug\ArcGISRuntime.WPF.Samples.dll' could not be found ArcGISRuntime.WPF.Viewer

Is this file sold separately, or should I rename an assembly reference?

Curiously,

Matthew

mbranscomb commented 7 years ago

I believe you are seeing that error because the project that contains the actual individual samples did not build. Therefore this error is most likely a product of the previous issue you raised regarding an error when building the AuthorMap sample. The sample viewer comprises 3 projects: a c# samples project, a vb.net samples project, and the viewer project. A successful build of the viewer is dependent upon successfully building the two samples projects.

SierraMultimedia commented 7 years ago

Thank you for your prompt reply.

Based on your belief, I built the other two projects separately. The Samples.VBNet project built successfully. The Samples.CSharp project reported the other error, so I understand how you drew your conclusion. While I agree that the missing method error is a concern, I don't understand how it pertains to a separate error in another project that references a different file of a different type in another directory.

The VB project references the file ArcGISRuntime.WPF.Samples.VB.dll in ~\src\WPF\ArcGISRuntime.WPF.Samples\obj\Debug. That's fine, because the file exists in the target directory. On the other hand, the CSharp project references the file ArcGISRuntime.WPF.Samples.dll in exactly the same directory, and no such file exists.

I just figured ArcGISRuntime.WPF.Samples.dll was not machine-dependent, so it should have been included in the ~\src\WPF\ArcGISRuntime.WPF.Samples\obj\Debug folder. Are you suggesting that once I resolve the missing method error, Visual Studio will create the missing DLL and place it in the target directory?

Curious as ever,

Matthew

SierraMultimedia commented 7 years ago

@mbranscomb Yes, sir: you were exactly right! Incidentally, I didn't doubt you; I just didn't understand the particular mechanics of DLL construction. The following has proven especially revealing!

support.microsoft.com/en-us/kb/815065

Thanks for your guidance! :+1: :grinning: