ThinkGeo.com    |     Documentation    |     Premium Support

Cannot start debug - Version 10 license issue?

I am in the process of upgrading our product to version 10 - we are currently using 9.
It is not possible to use NuGet in our project, so I got all the assemblies by using NuGet in a new project, and copied them to the real project.

I can build and run the new project, but I can not build and run the actual project.
I did fix all the compile errors, but at run time I get a PathTooLongException that looks a lot like a license issue.
When I open the product center app, I can see that I have an activated license on the machine.
It happens as the WpfMap is initializing - before adding any content.

Can you help me? Am I doing something wrong regarding licensing? - I know you changed some things.

Best regards
Jonas

Stacktrace:
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at cSQ=.2yQ=.GetFiles(String path, String searchPattern, Boolean recursive)
at ohM=.yhM=.1RM=(String licenseFileExtension, String searchPattern)
at ohM=.yhM=.zhM=()
at ohM=.yhM=.0hM=()
at ohM=.XRQ=.YxQ=()
at ohM=.XRQ=.YhQ=(Boolean needToShowProductCenter)
at ThinkGeo.MapSuite.ValidatorHelper.CheckStatus()
at ThinkGeo.MapSuite.ValidatorHelper.CheckObjectIsNotNull(Object parameterObject, String parameterName)
at ThinkGeo.MapSuite.Layers.Matrix.SetMatrix(String id, Double cellWidth, Double cellHeight, RectangleShape boundingBox, MatrixReferenceCorner referenceCorner)
at ThinkGeo.MapSuite.Layers.Matrix…ctor(String id, Double cellWidth, Double cellHeight, RectangleShape boundingBox, MatrixReferenceCorner referenceCorner)
at ThinkGeo.MapSuite.Layers.Matrix…ctor()
at ThinkGeo.MapSuite.Layers.TileMatrix…ctor(String id, Double scale, Int32 tileWidth, Int32 tileHeight, GeographyUnit boundingBoxUnit, MatrixReferenceCorner referenceCorner)
at ThinkGeo.MapSuite.Layers.MapSuiteTileMatrix…ctor(Double scale, Int32 tileWidth, Int32 tileHeight, GeographyUnit boundingBoxUnit)
at ThinkGeo.MapSuite.Layers.MapSuiteTileMatrix…ctor(Double scale)
at ThinkGeo.MapSuite.Layers.FileBitmapTileCache…ctor(String cacheDirectory, String cacheId)
at ThinkGeo.MapSuite.Layers.FileBitmapTileCache…ctor(String cacheDirectory)
at ThinkGeo.MapSuite.Layers.FileBitmapTileCache…ctor()
at slM=.Pxg=.SBg=(GeographyUnit mapUnit)
at ThinkGeo.MapSuite.Wpf.WpfMap.set_MapUnit(GeographyUnit value)

Hi Jonas,

We want to check something as below:

  1. Could you please let us know the reason why you cannot use NuGet in your project? Because when you install the packages via NuGet, it will automatic put some dlls into system folder. If you only copy the dlls, maybe it missed some steps.

If that’s because you cannot get package from NuGet server, you can download the packages to local and build a custom package source, then you don’t need install the packages from remote server.

  1. For your PathTooLong exception, our license file is in your bin folder, the windows limit 256 chars for the path, so please check your folder levels and try to reduce it. It should can be solved like this.

Regards,

Don

Hi Don, thanks for your answer

We don’t use NuGet because we use an internal package manager - that is the company policy for a number of reasons I don’t want to get into.

I want to do as you describe: download the necessary files and make a custom package for our internal package manager. I tried to do that using NuGet in a new project, and then grab the files from the bin folder. But I get that exception described above.
Can you provide me a list of the necessary files?

I cant find any license file - what it is called?
I don’t believe that the path is actually too long - the longest path in the bin is much shorter than 260.

Jonas

Hi Jonas,

  1. Please view the two guides, the first one shows how to build custom package source

http://wiki.thinkgeo.com/wiki/create_custom_package_source_guide

The 2nd one talk about download package, unzip them then how to reference dlls and copy dlls to your mainly project.

http://wiki.thinkgeo.com/wiki/version_10_manual_copy_dlls_guide

If you found any problem about them please let me know.

  1. About the license file, if your license file is auto generated by ProductCenter when you debug your project, this file is located in C:\Users[user name]\AppData\Local\ThinkGeo\Map Suite 10.0 and it’s name is MapSuite.lic.

If you build the license file manual in ProductCenter, that should can be find in your debug folder.

  1. About the too long exception, because that’s a system exception, we cannot get more information about that. If you make sure the path is shorter than 260, I think a new project can also reproduce it, could you please build a simple sample which can reproduce it, and test that again in the disk root folder like c: or d:. Please let us know the test result and sent us the path and project, so we can try to reproduce that also.

Regards,

Don

Thanks Don.

As I explained, it is not possible for us to rely on NuGet for package management, but thanks anyway.

Right now, I am really just trying to make it run, but I get that PathTooLong exception.
In version 9, the assemblies came as both strong named and not strong named.
We need the assemblies to be strong named, also the unmanaged ones, but I dont see the option anywhere. Are they all strong named already - the files you get through NuGet?

Also, please answer my question about the license file.

Best regards
jonas

Hi Don

I think I might know what the problem is. It appears that you treat AppDomain.CurrentDomain.RelativeSearchPath like it is a single path, but it is in fact a comma separated list of paths. In our system, it contains 34 relatively long paths. Read as a single path, it is way longer than 260.

This explains why I only see the exception in our actual product, and not in new test apps where AppDomain.CurrentDomain.RelativeSearchPath is null.

I have made a simple sample that reproduces the problem:

ThinkGeo10test.zip (106.9 KB)

Hi Jonas,

For V10 all our map dlls is strong name, some referenced 3rd part dlls are unmanaged dll(maybe c++), they don’t have the status of whether it is strong name, they can be called and works together well with our strong name dlls.

And please let me know if you have any further question about license file, as below is my previous reply about it.

About the license file, if your license file is auto generated by ProductCenter when you debug your project, this file is located in C:\Users[user name]\AppData\Local\ThinkGeo\Map Suite 10.0 and it’s name is MapSuite.lic.
If you build the license file manual in ProductCenter, that should can be find in your debug folder.

And thanks for your information about AppDomain.CurrentDomain.RelativeSearchPath. Our developer had fixed this bug, please get the ThinkGeo MapSuite 11.0.0-beta033 and Map Suite Desktop for Wpf - BareBone 11.0.0-beta025.

If you still found any problem please let us know.

Regards,

Don

Thanks for your answer Don

I have not further questions on license file and strong naming - thanks for your info on that.

You tell me that the bug fix regarding the AppDomain.CurrentDomain.RelativeSearchPath is now part of version 11 beta.
Will it be part of a stable version 10 build?

Jonas

Hi Jonas,

You can thought V11 beta as the small version of V10, generally we will build minor release about 3 months, but we build V11 beta if we get any update.

For more detail please view here: http://wiki.thinkgeo.com/wiki/map_suite_via_nuget#production_builds_stable_through_nuget

So please just feel free to use V11 beta version.

Regards,

Don